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

6/13

Page

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

Which of the following is the correct code?

Select an option to see the answer and solution.

The number of bytes contained in the multibyte character pointed to by a character is . . . . . . . .

Select an option to see the answer and solution.

Which of the following header declares mathematical functions and macros?

Select an option to see the answer and solution.

Which of the following library functions returns the time in UTC (Greenwich mean time) format?

Select an option to see the answer and solution.

A non-zero value is returned, if setjmp() returns from a longjmp() function call.

Select an option to see the answer and solution.

What will be the output of the following C code?
#include<stdio.h>
#include<limits.h>
main()
{
    int d;
    d=CHAR_MIN;
    printf("%d",d);
}

Select an option to see the answer and solution.

What members do the structure returned by function div() contains?

Select an option to see the answer and solution.

In the c library function void (*signal(int sig, void (*func)(int)))(int), which statement is true with respect to func?

Select an option to see the answer and solution.

The minimum value of CHAR_BIT is equal to . . . . . . . .

Select an option to see the answer and solution.

What is the name of the macro that is referred by assert macro defined in assert .h?

Select an option to see the answer and solution.

The sig argument specifies the signal, which may be any signal except . . . . . . . . and . . . . . . . .

Select an option to see the answer and solution.

Which function is called repeatedly by bsearch() to compare search elements against the elements in the array?

Select an option to see the answer and solution.

Which of the following format specifiers is used to represent the hours in the 24 hour clock (0-23) format?

Select an option to see the answer and solution.

Which of the following macros is not defined?

Select an option to see the answer and solution.

How many times can the macro setjmp() return?

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 = atof(str);
printf("String value = %s, Float value = %f\n", str, res);

Select an option to see the answer and solution.

The header file stdarg.h defines a variable type . . . . . . . .

Select an option to see the answer and solution.

Which of the following is the correct description of EXIT_FAILURE?

Select an option to see the answer and solution.

. . . . . . . . variable type defined in the header stdlib.h is an integer type of the size of a wide character constant.

Select an option to see the answer and solution.

What will be the output of the following C code?
#include <assert.h> 
#include <stdio.h>  
void main() 
{ 
   int n=12; 
   char str[50]="";
   assert(n >= 10); 
   printf(" output: %d\n", n); 
   assert(str != NULL); 
   printf("output: %s\n", str); 
}

Select an option to see the answer and solution.