I have a string of numbers that I want to work on as a string.
I basically want it to print out each number in turn until it reaches 12 characters, so that I can implement the actual next step.Code:#include <stdio.h> #include <string.h> int main() { char num[]= "9781552859544"; int i; for (; i<12; i++) { printf("%s", num[i]); } return 0; }
However, it's telling me that this array of chars has a type of int and %s expects type char * why is this?