Arrays and Strings MCQs
Practice free Arrays and Strings multiple-choice questions with instant answer feedback and step-by-step solutions. Click an option to check yourself, reveal the full explanation, and work through all 133 questions — no login required.
Question 91hard
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);Question 92medium
The C library function checks whether the passed character is printable.
Question 93hard
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);Advertisement
Question 94hard
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);Question 95easy
Which of the following is the variable type defined in header string. h?
Question 96hard
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");Advertisement
Question 97medium
Which among the given options is the right explanation for the statement size_t strcspn(c, s)?
Question 98medium
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.
Question 99medium
. . . . . . . . occurs when a result is too large in magnitude to represent errors as a floating-point value of the required type.