strings and numbers
I have to questions and you might of guessed from the title there about strings and numbers.
1.) Is there a way so a use can enter a sentance into my program instead of single words. (well want they will be entering is there address because its an address book)?
2.)Also when I try to save a number with 11 places (a phone number eg. 01298452879) the compilers says its too big how would i be able to save this number into a variable.
Use fgets and store it into a string. No need to store it as an integer. An int is a 32-bit value and your 11-digit number may exceed the maximum value of an int.
i don't understand
Sorry but I don't think I understand that is it possible that you could explain it like you were talking to a 5 year old.
Perhaps an example would help you see it:
1) You can store multiple words using fgets. It'll stop when you press return.
printf("Enter some words: ");
fgets(input, 20, stdin);
printf("\nYou have entered: %s\n", input);
2) Don't store a phone number as a number. Store it as a string. Use the same fgets routine above to handle this.
BTW, read up on fgets and you'll understand better what the function is doing.
Hope that helps.