C Objective Interview Questions – Strings
These C Objective Interview Questions On Strings post providing basic, intermediate and Hard level examples in C Strings. The Practice of these examples makes you good in C programming.
If the two strings are identical, then strcmp() function returns
Which of the following function is more appropriate for reading in a multi-word string?
- None of these.
What is the return type of strlen() function?
- unsigned int
- None of above.
How is a string typically processed?
- On a character by character basis
- On a string by string basis
- Both A and B
- None of the above.
Which of the following function sets first n characters of a string to a given character?
Which library function parses the string into tokens?
How will you print \n on the screen?
- echo “\\n”;
The if-condition can be replaced with? [if (isupper(c))]
- if (c>=65&&c<=97)
- if (c>=97&&c<=122)
- if (toupper(c))
What is the use of ungetc( )
- Reads a character
- Puts a character
- Pushes character back to stream