Vidyalelo
C Programming · all questions

Standard Library Functions
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

250

Questions

10/13

Page

Pick an option on a question to see the right answer and solution.

Which of the given structure is returned by the function ldiv()?

Select an option to see the answer and solution.

If NDEBUG is defined as a macro name, at the point where <assert.h> is included, then assert macro is defined as #define assert(ignore) ((void)0).

Select an option to see the answer and solution.

Choose the right declaration of longjmp() function.

Select an option to see the answer and solution.

Which of the given function converts the string pointed to, by the argument str to a floating-point number?

Select an option to see the answer and solution.

What will the following C statement do?
#include < setjmp.h >
int setjmp(jmp_buf env);

Select an option to see the answer and solution.

Select the multibyte character function defined under the header file stdlib.h.

Select an option to see the answer and solution.

When we use multiple alignas specifiers in the same declaration, the . . . . . . . . one is used.

Select an option to see the answer and solution.

The . . . . . . . . function sorts an array of objects.

Select an option to see the answer and solution.

The system() function passes the string pointed to by string to the host environment to be executed by a command processor in an implementation-defined manner.
int system(const char *string);

Select an option to see the answer and solution.

For the given math function, an error occurs if the arguments are not in the range [-1, +1].
double acos(double x);

Select an option to see the answer and solution.

Which of the following macros is defined under the header limits.h?

Select an option to see the answer and solution.

A range error occurs if the result of the function cannot be represented as a value.

Select an option to see the answer and solution.

Choose the correct statement.

Select an option to see the answer and solution.

What will be the output of the following C code, given that the maximum value of signed char is 127 and that of unsigned char is 255.
#include<stdio.h>
#include<limits.h>
#define SCHAR_MAX
main()
{
    printf("%d",SCHAR_MAX+1);
}

Select an option to see the answer and solution.

The . . . . . . . . function returns no value.

Select an option to see the answer and solution.

What will be the output of the following C code?
char str[] ;  
strcpy(str, "Hello"); 
res = atoi(str);
printf(" %s  %d\n", str, res);

Select an option to see the answer and solution.

What will be the output of the following C code?
void main() 
{ 
   div_t  res;  
   res = div(34, 4); 
   printf("quotient part = %d\n", res.quot); 
   printf("remainder part = %d\n", res.rem); 
}

Select an option to see the answer and solution.

Which function returns a pseudo-random integer?

Select an option to see the answer and solution.

Which of the following format specifiers is used to specify whether the given time is in AM or PM?

Select an option to see the answer and solution.

Which among the given function causes abnormal program termination ?

Select an option to see the answer and solution.