Question 1 of 25
Hints left: 3
Q1
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; }
Q2
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.
Q3
HUGE_VAL macro is used when the output of the function may not be . . . . . . . .
Q4
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); }
Q5
What will be the output of the following C code? #include<stdio.h> #include<limits.h> main() { printf("%f",FLT_MIN); }
Q6
What error occurs if the magnitude of x is too large in sinh(double x)?
Q7
Which of the following functions decomposes the input string into three pans: an initial, possibly empty, sequence of white-space characters?
Q8
Select the right statement.
Q9
The purpose of the function ctime() is that . . . . . . . .
Q10
The value of CHAR_MAX will be equal to SCHAR_MAX when . . . . . . . .
Q11
Which of the following format specifiers is used to represent the name of the time zone?
Q12
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; }
Q13
The value returned by the library function mktime(), on failure is . . . . . . . .
Q14
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); }
Q15
What will be the output of the following C code? #include<time.h> int main (void) { float n = time(NULL); printf("%.2f\n" , n); }
Q16
What will the following C code do on compilation? void main () { char com[50]; strcpy( com, "dir" ); system(com); }
Q17
Which statement is true with respect to RAND_MAX?
Q18
Select the macro that affects the information provided by localeconv function.
Q19
Which macro is used in the setlocale() function?
Q20
The cos function computes the cosine of x.
Q21
The macros defined under the header file limits.h are not defined under any other header file.
Q22
Which function will return the quotient and remainder on division of numerator with denominator?
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
The function abort() is defined in which of the following header file?
Q25
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; }