91. What will be the output of the following C code?
int ch= ' ';
if(isgraph(ch))
printf("ch = %c can be printed \n",ch);
else
printf("ch=%c cannot be printed \n",ch);
int ch= ' ';
if(isgraph(ch))
printf("ch = %c can be printed \n",ch);
else
printf("ch=%c cannot be printed \n",ch);
92. The C library function checks whether the passed character is printable.
93. What will be the output of the following C code?
int ch = '\t';
if(isprint(ch))
printf("ch = |%c| printable \n", ch);
else
printf("ch= |%c| not printable \n",ch);
int ch = '\t';
if(isprint(ch))
printf("ch = |%c| printable \n", ch);
else
printf("ch= |%c| not printable \n",ch);
94. What will be the output of the following C code?
const char pla[] = "string1";
const char src[] = "string2";
printf("Before memmove place= %s, src = %s\n", pla, src);
memmove(pla, src, 7);
printf("After memmove place = %s, src = %s\n", pla, src);
const char pla[] = "string1";
const char src[] = "string2";
printf("Before memmove place= %s, src = %s\n", pla, src);
memmove(pla, src, 7);
printf("After memmove place = %s, src = %s\n", pla, src);
95. Which of the following is the variable type defined in header string. h?
96. What will be the output of the following C code?
const char str1[] = "abcdef";
const char str2[] = "fgha";
char *mat;
mat= strpbrk(str1, str2);
if(mat)
printf("First matching character: %c\n", *mat);
else
printf("Character not found");
const char str1[] = "abcdef";
const char str2[] = "fgha";
char *mat;
mat= strpbrk(str1, str2);
if(mat)
printf("First matching character: %c\n", *mat);
else
printf("Character not found");
97. Which among the given options is the right explanation for the statement size_t strcspn(c, s)?
98. The standard white-space characters are the following: space (' '), form feed (' \ f '),
newline (' \n') , horizontal tab (' \tr), and vertlcal tab (' \v') can be tested with function.
newline (' \n') , horizontal tab (' \tr), and vertlcal tab (' \v') can be tested with function.
99. . . . . . . . . occurs when a result is too large in magnitude to represent errors as a floating-point value of the required type.
100. . . . . . . . . tells the compiler that this data is de?ned somewhere and will be connected with the linker.
Read More Section(Arrays and Strings)
Each Section contains maximum 100 MCQs question on Arrays and Strings. To get more questions visit other sections.