

Strings - Programming
Q1: Which of the following function sets first n characters of a string to a given character?A strinit()
B strnset()
C strset()
D strcset()
ANS:B - strnset() Declaration: char *strnset(char *s, int ch, size_t n); Sets the first n characters of s to ch
Output:
string before strnset: abcdefghijklmnopqrstuvwxyz
string after strnset: xxxxxxxxxxxxxnopqrstuvwxyz
|


For help Students Orientation
Mcqs Questions
One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.