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