Question 1 of 25
Hints left: 3
Q1
What will be the output of the following C code? #include<stdio.h> #include<limits.h> main() { printf("%f",FLT_MIN); }
Q2
Which macro is used in the setlocale() function?
Q3
What error occurs if the magnitude of x is too large in sinh(double x)?
Q4
Which function will return the quotient and remainder on division of numerator with denominator?
Q5
What will be the output of the following C code if the current system date is 6/22/2017? #include<stdio.h> #include<stdlib.h> #include<time.h> int main() { time_t ct; time(&ct); struct tm *mt=localtime(&ct); printf("%d\n",mt-> tm_mon+2); }
Q6
What will be the output of the following C code? #include <stdio.h> #include <time.h> int main () { double d; d = difftime (5,17); printf ("%.2f\n", d ); return 0; }
Q7
Select the macro that affects the information provided by localeconv function.
Q8
Which statement is true with respect to RAND_MAX?
Q9
The cos function computes the cosine of x.
Q10
Which of the following functions decomposes the input string into three pans: an initial, possibly empty, sequence of white-space characters?
Q11
Select the right statement.
Q12
What will be the output of the following C code? #include<time.h> int main (void) { float n = time(NULL); printf("%.2f\n" , n); }
Q13
What will the following C code do on compilation? void main () { char com[50]; strcpy( com, "dir" ); system(com); }
Q14
The value of CHAR_MAX will be equal to SCHAR_MAX when . . . . . . . .
Q15
The macros defined under the header file limits.h are not defined under any other header file.
Q16
The calloc() function allocates space for an array of n objects, each of whose size is defined by size. Space is initialized to all bits zero.
Q17
What will be the output of the following C code if the current system date is 6/22/2017? #include<stdio.h> #include<stdlib.h> #include<time.h> typedef struct tm tm; int main() { time_t ct; time(&ct); tm *mt=localtime(&ct); printf("%d\n",mt-> tm_year); }
Q18
The value returned by the library function mktime(), on failure is . . . . . . . .
Q19
The function abort() is defined in which of the following header file?
Q20
Which of the following format specifiers is used to represent the name of the time zone?
Q21
The purpose of the function ctime() is that . . . . . . . .
Q22
HUGE_VAL macro is used when the output of the function may not be . . . . . . . .
Q23
What will be the output of the following C code, if the system date is 6/23/2017? #include<stdio.h> #include<time.h> int main() { struct tm *local; time_t t; t=time(NULL); local=localtime(&t); printf("%d",local->tm_mday); return 0; }
Q24
What will be the output of the following C code if the system date is 8/22/2016? #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,"%B",ptr); puts(str); return 0; }
Q25
What will be the output of the following C code if it is executed on 2nd January, 2017 (system date)? #include<stdio.h> #include<time.h> int main() { struct tm *local, *gm; time_t t; t=time(NULL); local=localtime(&t); printf("%d",local->tm_yday); return 0; }