Question
a.
String is a new Data Type in C
b.
String is an array of Characters with null character as the last element of array.
c.
String is an array of Characters with null character as the first element of array
d.
String is an array of Integers with 0 as the last element of array.
Posted under C Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is a String in C Language?
Similar Questions
Discover Related MCQs
Q. What is the correct syntax of enum?
View solution
Q. Arithmetic operations are not allowed on enumerated constants.
View solution
Q. Pick the incorrect statement with respect to enums.
View solution
Q. String handling functions such as strcmp(), strcpy() etc can be used with enumerated types.
View solution
Q. All enum constants are
View solution
Q. If we do not explicitly assign values to enum names, the compiler by default assigns values to ?
View solution
Q. Enumeration (or enum) is a ______ data type in C.
View solution
Q. Which of the following gives the memory address of the first element in array foo, an array with 10 elements?
View solution
Q. Let x be an array.Which of the following operations is illegal?
i) ++x.
ii) x+1.
iii) x++.
iv) x*2.
View solution
Q. Which of the following statements are correct ?
1. A string is a collection of characters terminated by '.
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.
View solution
Q. How will you print ' ' on the screen?
View solution
Q. Length of the string "compsciedu" is
View solution
Q. 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.
View solution
Q. Which of the following statements are correct about the below declarations?
char *p = "Sanjay";char a[] = "Sanjay";
1: There is no difference in the declarations and both serve the same purpose.
2: p is a non-const pointer pointing to a non-const string, whereas a is a const pointer pointing to a non-const pointer.
3: The pointer p can be modified to point to another string, whereas the individual characters within array a can be changed.
4: In both cases the '\0' will be added at the end of the string "Sanjay".
View solution
Q. Which of the following statement is correct?
View solution
Q. 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.
View solution
Q. Which of the following statements are correct about the below declarations?
char *p = "Sanjay";
char a[] = "Sanjay";
1: There is no difference in the declarations and both serve the same purpose.
2: p is a non-const pointer pointing to a non-const string, whereas a is a const pointer pointing to a non-const pointer.
3: The pointer p can be modified to point to another string, whereas the individual characters within array a can be changed.
4: In both cases the '\0' will be added at the end of the string "Sanjay".
View solution
Suggested Topics
Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!
Java Programming
Level up your coding skills with our Java Programming MCQs. From object-oriented...
Software Engineering
Learn about the systematic approach to developing software with our Software...