Question 1 of 25
Hints left: 3
Q1
void free(void *ptr) deallocates the memory previously allocated by a call to . . . . . . . . , . . . . . . . . or . . . . . . . .
Q2
What is "a" in the given C code? size_t wcstombs(char *s, const wchar_t *a, size_t n)
Q3
Which function is used to recombine the fraction and exponent parts of a floating-point value after you have worked on them separately?
Q4
All the functions in this library take as a parameter and return as the output.
Q5
What will be the output of the following C code? Maximum value of int = 1000 Maximum value of float = 5000 Maximum value of short int = 327 Minimum value of short int = -328 #include<stdio.h> #include<limits.h> #include<float.h> main() { short int d; d=INT_MAX + FLT_MAX; printf("%d",d); }
Q6
. . . . . . . . gives receipt of an interactive attention signals.
Q7
The maximum value of a signed char is not the same as the maximum value of an unsigned char.
Q8
To find the maximum value of an object of type unsigned long long int, we use the macro . . . . . . . .
Q9
Which of the following returns a signed integer type on finding the difference between two pointers to elements in the same array?
Q10
What is the meaning of the following C code if output is 0? #include<stdio.h> #include<time.h> int main() { struct tm *local; time_t t; t=time(NULL); local=localtime(&t); printf("%d",local->tm_isdst); return 0; }
Q11
The following message is displayed in stderr. Assertion failed: expression, file filenum, line nmn
Q12
What will be the output of the following C code? double x=3,y= - 6; printf("%lf %lf", fabs(x), fabs(y));
Q13
What is the purpose of the given C code? #include <stdlib.h> _Mbsave _Mbxtowc = {0}; int (mbtowc) (wchar_t *pwc, const char *a, size_t n) { return (-Mbtowc (pwc, s, n, &-Mbxtowc) ) ; }
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> int main() { time_t ct; time(&ct); struct tm *mt=localtime(&ct); printf("%d\n",mt-> tm_date); }
Q15
What error occurs if an input argument is outside the domain over which the mathematical function is de?ned?
Q16
What will be the output of the following C code if the name entered is "TOM" and time taken to enter this name is 2 seconds? #include <stdio.h> #include <time.h> int main () { time_t time1,time2; char get_input [256]; double dif_sec; time (&time1); printf ("Please enter the name of your pet: "); gets (get_input); time (&time2); dif_sec = difftime (time2,time1); printf ("%.2f\n", dif_sec ); return 0; }
Q17
Which macro affects the strftime() function?
Q18
What will be the output of the following C code? #include <stddef.h> int main(void) { int num[10]; int *p1=&num[14], *p2=&num[19]; ptrdiff_t a = p1-p2; printf("%d", a); }
Q19
What will be the output of the following C code? #include<stdio.h> #include<limits.h> main() { if(UCHAR_MAX<=SCHAR_MAX) printf("hello"); else printf("good"); }
Q20
Which among the given macros is defined in the header file locale.h?
Q21
What will be the output of the following C code? #include<stdio.h> #include<time.h> main() { struct tm t; time_t tc; t.tm_year=2017-1900; t.tm_mday=25; t.tm_mon=5; t.tm_hour=1; t.tm_min=30; t.tm_sec=0; t.tm_isdst=0; tc=mktime(&t); printf(ctime(&tc)); }
Q22
Which function searches an environmenr list that are provided by the host environment?
Q23
Which of the given options is an array type used for holding information?
Q24
The assert shall be implemented as a . . . . . . . . not as an actual . . . . . . . .
Q25
Given that the value of SHRT_MAX is equal to 32767 and that of SHRT_MIN is equal to -32768, What will be the output of the following C code? #include<stdio.h> #include<limits.h> main() { int d; d=SHRT_MAX + SHRT_MIN+1; printf("%d",d); }