Which macro is used in the setlocale() function?
Answer: C
No answer description available for this question.
Enter details here
Choose the right declaration of longjmp() function.
Answer: A
No answer description available for this question.
Enter details here
Which of the given option is declared under the header file stdlib.h?
Answer: D
SEEK_CUR and SEEK_END is defined under stdio.h, CLOCKS_PER_SEC is defined under time.h, EXIT_SUCCESS is defined under stdlib.h.
EXIT_SUCCESS specifies value for status argument to exit indicating success.
Enter details here
The library function clock() returns the number of _________ elapsed since the start of the program.
Answer: B
No answer description available for this question.
Enter details here
What will be the output of the program?
#include
#include
int main()
{
char *i = "55.555";
int result1 = 10;
float result2 = 11.111;
result1 = result1+atoi(i);
result2 = result2+atof(i);
printf("%d, %f", result1, result2);
return 0;
}
Answer: C
Function atoi() converts the string to integer.
Function atof() converts the string to float.
result1 = result1+atoi(i);
Here result1 = 10 + atoi(55.555);
result1 = 10 + 55;
result1 = 65;
result2 = result2+atof(i);
Here result2 = 11.111 + atof(55.555);
result2 = 11.111 + 55.555000;
result2 = 66.666000;
So the output is "65, 66.666000" .
Enter details here
The _______ macro shall be invoked before any access to the unnamed arguments.
Answer: D
No answer description available for this question.
Enter details here
Which function returns a pseudo-random integer?
Answer: B
No answer description available for this question.
Enter details here
Can you use the fprintf() to display the output on the screen?
Answer: A
Do like this fprintf(stdout, "%s %d %f", str, i, a);
Enter details here
Which macro can be used to detect and report exceptional conditions?
Answer: C
No answer description available for this question.
Enter details here
What will be the output of the program?
#include
int main()
{
int i;
i = scanf("%d %d", &i, &i);
printf("%d\n", i);
return 0;
}
Answer: B
No answer description available for this question.
Enter details here