31. The three macros defined by stdarg.h is . . . . . . . .
32. . . . . . . . . macro must be called before using . . . . . . . . and . . . . . . . .
33. 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);
}
#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);
}34. 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;
}
#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;
}35. Which macro sets everything defined under locale. h?
36. The void longjmp( jmp-buf env, int val) function causes setjmp() macro to return . . . . . . . . value; if val is 0.
37. Which of the following functions is used to convert the date and time into a calendar format?
38. What does raise functions declared in signal.h do?
39. Which function converts the wide-character string to a multibyte string?
40. Select the macro that abnormally terminates the program.
Read More Section(Standard Library Functions)
Each Section contains maximum 100 MCQs question on Standard Library Functions. To get more questions visit other sections.
