Question 1 of 23
Hints left: 3
Q1
If setjmp() macro returns directly from the macro invocation, it . . . . . . . .
Q2
Which of the following functions is used to convert the date and time into a calendar format?
Q3
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); }
Q4
What is the function of the given longjump(jmp_buf buf, i)?
Q5
The macro . . . . . . . . defines the number of bits in a byte, which is equal to . . . . . . . .
Q6
The abs() function computes the absolute value . . . . . . . .
Q7
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); }
Q8
The void longjmp( jmp-buf env, int val) function causes setjmp() macro to return . . . . . . . . value; if val is 0.
Q9
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); }
Q10
Select the function that reads or sets location dependent information.
Q11
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);
Q12
What does raise functions declared in signal.h do?
Q13
Which of the given function is a library function under the header math.h?
Q14
Which macro sets everything defined under locale. h?
Q15
. . . . . . . . macro must be called before using . . . . . . . . and . . . . . . . .
Q16
Which of the following is the correct description of the macro SIGFPE?
Q17
Which header file is used to define data formats and currency symbols?
Q18
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); }
Q19
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; }
Q20
Which function converts the wide-character string to a multibyte string?
Q21
Select the macro that abnormally terminates the program.
Q22
The three macros defined by stdarg.h is . . . . . . . .
Q23
How many times does the function longjmp() returns?