ExamVeda
Login
Home
51
What will be the output of the following C code?
#include <stdio.h>
#include <stdlib.h>
int main()
{
    printf("%d\n", rand() % 1000);
    return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
52
If the mode includes b after the initial letter, what does it indicates?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
53
What will be the output of the following C code if following commands are used to run (considering myfile exists)?
gcc -otest test.c
./test > myfile

 #include <stdio.h>
int main(int argc, char **argv)
{
    char c = 'd';
    putchar(c);
    printf(" %d\n", argc);
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
54
What will be the output of the following C code?
scanf(“ %d %d %d”,&n1,&n2);
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
55
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int i = 10, j = 2;
    printf("%d\n", printf("%d %d ", i, j));
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
56
A fatal error will be generated if the format string is ended with a white space character.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
57
Which of the following mode argument is used to truncate?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
58
What will be the output of the following C code?
#include <stdio.h>
#include <stdarg.h>
int f(char c, ...);
int main()
{
    char c = 97, d = 98;
    f(c, d);
    return 0;
}
int f(char c, ...)
{
    va_list li;
    va_start(li, c);
    char d = va_arg(li, char);
    printf("%c\n", d);
    va_end(li);
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
59
What does the following command line signify?
prog1|prog2
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
60
Which function has a return type as char pointer?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board