When a string is declared as a character array, the string must be terminated with a ________.
- comma
- null character
- semicolon
- space
In C, a string is a sequence of characters terminated by a null character (' '). This null character signifies the end of the string.
Loading...
Related Quiz
- What is a pointer in C programming?
- The ________ directive is used to define symbolic names or constants in a C program.
- Which function is used to close a file that has been opened for reading or writing?
- You're writing a program that needs to efficiently calculate the power of 2 for a given exponent. Which operator would be most efficient to use?
- What is the difference between an array and a pointer in the context of C programming?