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 82hard
What will be the output of the following C code?
char ch[ ] = "0xC";
if(isxdigit(ch[ ]))
printf("ch = %s is hexadecimal character \n",ch);
else
printf("ch = %s is not hexadecimal character \n",ch);Question 83easy
What will strcmp() function do?
Question 84medium
The C library function . . . . . . . . breaks string s1 into a series of tokens using the delimiter s2.
Advertisement
Question 85easy
What is the function of void *memset(s, c, n)?
Question 86medium
Which among the given options compares atmost n characters of string ch to string s?
Question 87medium
Is there any function declared as strstr()?
Advertisement
Question 88hard
What will be the output of the following C code?
char str1[] = "Helloworld ";
char str2[] = "Hello";
len = strspn(str1, str2);
printf("Length of initial segment matching %d\n", len );Question 89medium
fgetc, getc, getchar are all declared in . . . . . . . .
Question 90hard
What will be the output of the following C code?
void *memset(void *c, int c, size-t n)
unsigned char ch = c;
unsigned char *su;
for (su = s; 0 < n; ++su, --n)
<br>
*su = ch;
<br>