A character pointer prints the entire character array because it is designed to treat the input as a string of characters and print until it hits a null character ('\0') indicating the end of the string. On the other hand, an integer pointer treats the input as a sequence of integers and only prints the value of the integer it points to. It would require a loop to print the entire integer array pointed to by the integer pointer.
Asked: 2023-07-09 22:42:33 +0000
Seen: 9 times
Last updated: Jul 09 '23