0

How would you convert a string such as gcardNum to be stored in an integer array?

char gcardNum[17] = ""; //16 digit gift card number
printf("What is your 16 digit gift card number?\n"); 
scanf("%s", gcardNum); // asks the user for their 16 digit gc number
mrmos
  • 1
  • Please define *integer array*, with an example if possible. And read at least the manual for `scanf()` to use it right, or use something else like `fgets()` to make your life easier. Although this does not appear to be related to your question. – Iharob Al Asimi Nov 26 '15 at 04:21
  • @Acoop good duplicate, but I am not sure this is what the OP wants. – Iharob Al Asimi Nov 26 '15 at 04:26
  • hope this helps, http://stackoverflow.com/questions/19473439/converting-integer-strings-to-integer-array – t1t1an0 Nov 26 '15 at 04:30

0 Answers0