Question 1 of 25
Hints left: 3
Q1
What will be the output of the following C code? void main() { div_t res; res = div(34, 4); printf("quotient part = %d\n", res.quot); printf("remainder part = %d\n", res.rem); }
Q2
Which of the given function converts the string pointed to, by the argument str to a floating-point number?
Q3
When we use multiple alignas specifiers in the same declaration, the . . . . . . . . one is used.
Q4
Which function returns a pseudo-random integer?
Q5
The following C code results in an error. State whether true or false. #include<stdio.h> #include<time.h> int main() { struct tm *local; time_t t; t=time(NULL); local=asctime(localtime(&t)); printf("%d",local->tm_wday); return 0; }
Q6
Select the multibyte character function defined under the header file stdlib.h.
Q7
The assert macro returns . . . . . . . . value.
Q8
What is returned by the function if the space cannot be allocated by the function malloc(), realloc() and calloc()?
Q9
What will be the output of the following C code, given that the maximum value of signed char is 127 and that of unsigned char is 255. #include<stdio.h> #include<limits.h> #define SCHAR_MAX main() { printf("%d",SCHAR_MAX+1); }
Q10
For the given math function, an error occurs if the arguments are not in the range [-1, +1]. double acos(double x);
Q11
Which of the following format specifiers is used to specify whether the given time is in AM or PM?
Q12
If NDEBUG is defined as a macro name, at the point where <assert.h> is included, then assert macro is defined as #define assert(ignore) ((void)0).
Q13
What will the following C statement do? #include < setjmp.h > int setjmp(jmp_buf env);
Q14
The . . . . . . . . function returns no value.
Q15
Which of the given option is declared under the header file stdlib.h?
Q16
If access to the varying arguments is desired then the called function shall declare . . . . . . . . having type va_list.
Q17
The . . . . . . . . function sorts an array of objects.
Q18
Which of the following macros is defined under the header limits.h?
Q19
Choose the right declaration of longjmp() function.
Q20
What will be the output of the following C code? char str[] ; strcpy(str, "Hello"); res = atoi(str); printf(" %s %d\n", str, res);
Q21
Choose the correct statement.
Q22
The system() function passes the string pointed to by string to the host environment to be executed by a command processor in an implementation-defined manner. int system(const char *string);
Q23
Which of the given structure is returned by the function ldiv()?
Q24
A range error occurs if the result of the function cannot be represented as a value.
Q25
Which among the given function causes abnormal program termination ?