In C, a string is terminated by:
-
A
the null character '\0'
Correct answer
-
B
a newline character
-
C
a space character
-
D
the character 'EOF'
Correct answer
A. the null character '\0'
14 views
Explanation
String functions rely on the null character '\0' to detect the end of a string.
Reference
Asked in: NTS, PPSC IT, Campus Interviews
Doubts & discussion
Not sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ