Arrays and Strings MCQs

133 questionsC-ProgramPage 9 of 15

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 73medium
No library function will store a zero in errno.
Question 74medium
The . . . . . . . . function tests for any hexadecimal-digit character.
Question 75medium
What does the following C code do?
int iscntrl( int c);
Advertisement
Question 76medium
Which of the given function is used to return a pointer to the located character?
Question 77hard
What will the following C code do?
char * strrchr(const char *s, int c )
char ch = c;
char *sc;
for(sc = NULL; ; ++s)
if(*s == ch)
SC = 9;
i f (*s =='\O' )
return (( char *) s);
Question 78easy
Which function returns true only for the characters defined as lowercase letters?
Advertisement
Question 79medium
The . . . . . . . . function returns the number of characters that are present before the terminating null character.
Question 80medium
The . . . . . . . . function appends not more than n characters.
Question 81hard
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);