Standard Library Functions MCQs

250 questionsC-ProgramPage 26 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 226easy
The value of tm_isdst is . . . . . . . . when DST( Daylight Savings Time) is in effect, . . . . . . . . when DST is not in effect and . . . . . . . . when the DST status is unknown.
Question 227easy
The behavior is undefined if more than one call to the exit function is executed by a program.
Question 228easy
What is the function of the given longjump(jmp_buf buf, i)?
Advertisement
Question 229easy
Which of the given function is a library function under the header math.h?
Question 230easy
Which header file is used to define data formats and currency symbols?
Question 231easy
The three macros defined by stdarg.h is . . . . . . . .
Advertisement
Question 232easy
. . . . . . . . macro must be called before using . . . . . . . . and . . . . . . . .
Question 233easy
Point out the error (if any) in the following C code?
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
    int* p = NULL;
    struct S *s = NULL;
    void(*f)(int, double) = NULL;
    char *ptr = malloc(15);
    if (ptr == NULL) printf("Out of memory");
    free(ptr);
}
Question 234easy
What will be the output of the following C code if the system date is 6/2/2017 (Friday)?
#include<stdio.h>
#include<time.h>
int main()
{
    struct tm *ptr;
    time_t t;
    char str[100];
    t = time(NULL);
    ptr = localtime(&t);
    strftime(str,100,"%A",ptr);
    puts(str);
    return 0;
}