C Programming - Strings - Discussion

Discussion Forum : Strings - Point Out Correct Statements (Q.No. 3)
3.
Which of the following statements are correct ?
1: A string is a collection of characters terminated by '\0'.
2: The format specifier %s is used to print a string.
3: The length of the string can be obtained by strlen().
4: The pointer CANNOT work on string.
1, 2
1, 2, 3
2, 4
3, 4
Answer: Option
Explanation:

Clearly, we know first three statements are correct, but fourth statement is wrong. because we can use pointer on strings. Eg. char *p = "IndiaBIX".

Discussion:
1 comments Page 1 of 1.

Rukmini said:   8 years ago
Can anyone explain the above answer?

Post your comments here:

Your comments will be displayed after verification.