Question 1 of 25
Hints left: 3
Q1
What is the function of void *memset(s, c, n)?
Q2
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);
Q3
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.
Q4
. . . . . . . . tells the compiler that this data is de?ned somewhere and will be connected with the linker.
Q5
The . . . . . . . . function returns the number of characters that are present before the terminating null character.
Q6
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>
Q7
The . . . . . . . . function appends not more than n characters.
Q8
What will strcmp() function do?
Q9
fgetc, getc, getchar are all declared in . . . . . . . .
Q10
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);
Q11
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);
Q12
Which function returns true only for the characters defined as lowercase letters?
Q13
The C library function checks whether the passed character is printable.
Q14
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);
Q15
The C library function . . . . . . . . breaks string s1 into a series of tokens using the delimiter s2.
Q16
Which of the following is the right syntax to copy n characters from the object pointed to by s2 into the object pointed to by s1?
Q17
Is there any function declared as strstr()?
Q18
Which among the given options is the right explanation for the statement size_t strcspn(c, s)?
Q19
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 );
Q20
. . . . . . . . occurs when a result is too large in magnitude to represent errors as a floating-point value of the required type.
Q21
Which of the following is the variable type defined in header string. h?
Q22
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");
Q23
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);
Q24
Which among the given options compares atmost n characters of string ch to string s?
Q25
The isdigit function tests for any decimal-digit character.