15.
What will be the output of the following C code?
const char str1[]="ABCDEF1234567";
const char str2[] = "269";
len = strcspn(str1, str2);
printf("First matching character is at %d\n", len + 1);

16.
What will be the output of the following C code?
char str1[15];
char str2[15];
int mat;
strcpy(str1, "abcdef");
strcpy(str2, "ABCDEF");
mat= strncmp(str1, str2, 4);
if(mat< 0)
printf("str1 is not greater than str2");
else if(mat> 0)
printf("str2 is is not greater than str1");
else
printf("both are equal");

18.
The mem functions are meant for . . . . . . . .

19.
What will the given C code do?
int memcmp(const void *str1, const void *str2, size_t n)

Read More Section(Arrays and Strings)

Each Section contains maximum 100 MCQs question on Arrays and Strings. To get more questions visit other sections.