So i am trying to improve programs i write. My programs are usually for calculations due to my uni course.
At the moment my programs take in integers using scanf, but if someone puts a letter in by mistake, they crash so i want to use strings.
If i completely remove anything to do with b and c, the program can print a, but once b and c come along, it crashes. What am i doing wrong? I have no idea of the length these variables could be so i cant use arrays i dont think.
char *a, *b, *c;
printf("Please input a, b and c in the form of a b c\n");
printf ("%s %s %s", a, b, c);
is there a neater way of doing this?