C Programming - Strings

@ : Home > C Programming > Strings > General Questions


"Life is like riding a bicycle. To keep your balance you must keep moving."
- Albert Einstein

Which of the following function sets first n characters of a string to a given character?

A. strinit()B. strnset()
C. strset()D. strcset()


If the two strings are identical, then strcmp() function returns

A. -1B. 1
C. 0D. Yes


How will you print \n on the screen?

A. printf("\n");B. echo "\\n";
C. printf('\n');D. printf("\\n");


The library function used to find the last occurrence of a character in a string is

A. strnstr()B. laststr()
C. strrchr()D. strstr()


Which of the following function is used to find the first occurrence of a given string in another string?

A. strchr()B. strrchr()
C. strstr()D. strnset()

© 2008-2015 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Contact us:     Follow us on twitter!