81. What will be the output of the following C code?
const char str1[10]="Helloworld";
const char str2[10] = "world";
char *mat;
mat = strstr(str1, str2);
printf("The substring is:%s\n", mat);
const char str1[10]="Helloworld";
const char str2[10] = "world";
char *mat;
mat = strstr(str1, str2);
printf("The substring is:%s\n", mat);
82. 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);
char ch[ ] = "0xC";
if(isxdigit(ch[ ]))
printf("ch = %s is hexadecimal character \n",ch);
else
printf("ch = %s is not hexadecimal character \n",ch);
83. What will strcmp() function do?
84. The C library function . . . . . . . . breaks string s1 into a series of tokens using the delimiter s2.
85. What is the function of void *memset(s, c, n)?
86. Which among the given options compares atmost n characters of string ch to string s?
87. Is there any function declared as strstr()?
88. 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 );
char str1[] = "Helloworld ";
char str2[] = "Hello";
len = strspn(str1, str2);
printf("Length of initial segment matching %d\n", len );
89. fgetc, getc, getchar are all declared in . . . . . . . .
90. 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>
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>
Read More Section(Arrays and Strings)
Each Section contains maximum 100 MCQs question on Arrays and Strings. To get more questions visit other sections.