Arrays (continued)
In the computer memory, the array looks like contiguous memory locations.
After a statement like “gets(buffer);” the array would get filled with the characters entered at the keyboard.
When using this char array with strings, give the array name in functions which are setup to handle string data:
printf(“Please enter a greeting: “);
scanf(“%s”, buffer);
printf(“You entered the greeting %s\n”, buffer);
puts(buffer);