Standard Library Functions MCQs
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 172easy
What will be the output of the following C code?
#include<time.h>
int main (void)
{
float n = time(NULL);
printf("%.2f\n" , n);
}Question 173easy
What will be the output of the following C code if the current system date is 6/22/2017?
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main()
{
time_t ct;
time(&ct);
struct tm *mt=localtime(&ct);
printf("%d\n",mt-> tm_mon+2);
}Question 174easy
What will be the output of the following C code, if the system date is 6/23/2017?
#include<stdio.h>
#include<time.h>
int main()
{
struct tm *local;
time_t t;
t=time(NULL);
local=localtime(&t);
printf("%d",local->tm_mday);
return 0;
}Advertisement
Question 175easy
The calloc() function allocates space for an array of n objects, each of whose size is defined by size. Space is initialized to all bits zero.
Question 176easy
Select the macro that affects the information provided by localeconv function.
Question 177easy
The value of CHAR_MAX will be equal to SCHAR_MAX when . . . . . . . .
Advertisement
Question 178easy
Which of the given option is declared under the header file stdlib.h?
Question 179easy
If access to the varying arguments is desired then the called function shall declare . . . . . . . . having type va_list.
Question 180easy
The assert macro returns . . . . . . . . value.