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

13/13

Page

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

If setjmp() macro returns directly from the macro invocation, it . . . . . . . .

Select an option to see the answer and solution.

What will be the output of the following C code?
#include <stddef.h>
int main(void)
{
    int num[15];
    int *p1=&num['a'], *p2=&num['A'];
    ptrdiff_t d = p1-p2;
    printf("%d", d);
}

Select an option to see the answer and solution.

What will be the output of the following C code?
int main () 
{ 
   printf("starting of program\n"); 
   printf("program exits\n"); 
   exit(0);  
   printf("program ends\n");  
   return(0); 
}

Select an option to see the answer and solution.

Select the function that reads or sets location dependent information.

Select an option to see the answer and solution.

How many times does the function longjmp() returns?

Select an option to see the answer and solution.

What will be the output of the following C code?
double x, deg, rad;
x = 1.0;
val = 180.0 / 3.14;
deg = atan (x) * val;
printf("The arc tangent of %lf is %lf degrees", x, deg);

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=11; 
   char str[50]="program";
   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.

The macro . . . . . . . . defines the number of bits in a byte, which is equal to . . . . . . . .

Select an option to see the answer and solution.

The abs() function computes the absolute value . . . . . . . .

Select an option to see the answer and solution.

Which of the following is the correct description of the macro SIGFPE?

Select an option to see the answer and solution.