UNIT – 8
WORKIGN WITH STRINGS
1) String in C are stored as ______
*a) ‘\0’ b)blank c)\n d)None
2) String functions are available in _____ header file
a) *string.h b)stdio.h c)conio.h d) None
3) _____ function is used to copy the string value from one variable to another variable.
a)strcat() b)*strcpy() c)strlen() d)None
4) _____ function is used to compare both the string values are same or not .
a)strcat() b)*strcmp() c)strlen() d)None
5) _____ function is used to find the number of characters in a string.
a) strcat() b)strcpy() c)*strlen() d)None
6) ______ function is useful to initialize a string to all nulls or to any character.
a) strcat() b)strcpy() c)*memset() d) None
7) _ function is used to copy the specify the number of characters into another variable.
a) strcat() b)strcpy() c)*strncpy() d)None
8) _______ function appends at most N characters from the source string to the end of the destination string.
a) strcat() b)*strncat() c)strncpy() d) None
9) In C, strings are arrays of _______.
a) *characters b)integer c)float d) None
10) Char word[20]=”acme” . ____ number of bytes will occupy in the memory.
a) 4 b)*5 c)1 d)None
UNIT – 8
WORKING WITH STRINGS
1 A 2 A 3 B 4 B 5 C
6 C 7 C 8 B 9 A 10 B