Standard Library Functions MCQs

250 questionsC-ProgramPage 17 of 28

Practice free Standard Library Functions 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 250 questions — no login required.

Question 145easy
Given that the value of SHRT_MAX is equal to 32767 and that of SHRT_MIN is equal to -32768, What will be the output of the following C code?
#include<stdio.h>
#include<limits.h>
main()
{
    int d;
    d=SHRT_MAX + SHRT_MIN+1;
    printf("%d",d);
}
Question 146easy
Which of the given options is an array type used for holding information?
Question 147easy
What will be the output of the following C code?
double x=3,y= - 6;
printf("%lf %lf", fabs(x), fabs(y));
Advertisement
Question 148easy
Which among the given macros is defined in the header file locale.h?
Question 149easy
To find the maximum value of an object of type unsigned long long int, we use the macro . . . . . . . .
Question 150easy
void free(void *ptr) deallocates the memory previously allocated by a call to . . . . . . . . , . . . . . . . . or . . . . . . . .
Advertisement
Question 151easy
What is the meaning of the following C code if output is 0?
#include<stdio.h>
#include<time.h>
int main()
{
    struct tm *local;
    time_t t;
    t=time(NULL);
    local=localtime(&t);
    printf("%d",local->tm_isdst);
    return 0;
}
Question 152easy
What is the purpose of the given C code?
#include <stdlib.h> 
_Mbsave _Mbxtowc = {0};  
int (mbtowc) (wchar_t *pwc, const char *a, size_t n) 
{
return (-Mbtowc (pwc, s, n, &-Mbxtowc) ) ;
}
Question 153easy
What will the following C code do on compilation?
void main () 
{
   char com[50];  
   strcpy( com, "dir" ); 
   system(com); 
}