1. What is returned by the function if the space cannot be allocated by the function malloc(), realloc() and calloc()?
2. 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;
}
#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;
}
3. RAND_MAX macro is the maximum value returned by the rand function.
4. What will be the output of the following C code?
char word[20 ] = "1.234555 WELCOME";
char *w; double dis;
dis= strtod(word, &w);
printf("The number is %lf\n", dis);
printf("String is |%s|", w);
char word[20 ] = "1.234555 WELCOME";
char *w; double dis;
dis= strtod(word, &w);
printf("The number is %lf\n", dis);
printf("String is |%s|", w);
5. Which function returns the arc sine in the range [-pi/2, +pi/2] radians?
6. If the result underflow, the function returns zero.
7. Which of the following header file defines one function longjmp(), and one variable type jmp_buf?
8. The mbstowcs() function is used to return the number of array elements modified, not including a terminating zero code, if any.
9. longjmp() function is the only function defined under the header file setjmp.h?
10. void assert(int expression) when the expression is evaluated to true?
Read More Section(Standard Library Functions)
Each Section contains maximum 100 MCQs question on Standard Library Functions. To get more questions visit other sections.