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
scanf() returns the number of variables to which you are provding the input.
i = scanf("%d %d", &i, &i); Here Scanf() returns 2. So i = 2.
printf("%d\n", i); Here it prints 2.
Enter details here
The source filename and line number come from the preprocessor macros________and______
Answer: A
No answer description available for this question.
Enter details here
What is stderr ?
Answer: C
The standard error(stderr) stream is the default destination for error messages and other diagnostic warnings. Like stdout, it is usually also directed to the output device of the standard console (generally, the screen).
Enter details here
What will be the output of the program?
#include
int main()
{
int i;
i = printf("How r u\n");
i = printf("%d\n", i);
printf("%d\n", i);
return 0;
}
Answer: B
In the program, printf() returns the number of charecters printed on the console
i = printf("How r u\n"); This line prints "How r u" with a new line character and returns the length of string printed then assign it to variable i.
So i = 8 (length of '\n' is 1).
i = printf("%d\n", i); In the previous step the value of i is 8. So it prints "8" with a new line character and returns the length of string printed then assign it to variable i. So i = 2 (length of '\n' is 1).
printf("%d\n", i); In the previous step the value of i is 2. So it prints "2".
Enter details here
Which of the given function differs from the statement'errno is not neccessarily set on conversion error'?
Answer: D
No answer description available for this question.
Enter details here
mblen() function returns 0,if a null wide character was recognized. It returns -1 if an invalid multi-byte sequence was encountered.
Answer: A
No answer description available for this question.
Enter details here
The mbstowcs() function is used to return the number of array elements modified, not including a terminating zero code, if any.
Answer: A
No answer description available for this question.
Enter details here
Input/output function prototypes and macros are defined in which header file?
Answer: C
stdio.h, which stands for "standard input/output header", is the header in the C standard library that contains macro definitions, constants, and declarations of functions and types used for various standard input and output operations.
Enter details here
Which function is used to recombine the fraction and exponent parts of a floating-point value after you have worked on them separately?
Answer: D
No answer description available for this question.
Enter details here
The macro MB_LEN_MAX is used to find _________
Answer: A
No answer description available for this question.
Enter details here