ExamVeda
Login
Home
31
What is the size of array "line" used in fgets(line, maxline, *fp) function?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
32
What will be the output of the following C statement?
int ungetc(int c, FILE *fp)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
33
In the below C program, every time program is run different numbers are generated.
#include <stdio.h>
#include <stdlib.h>
int main()
{
    printf("%d\n", rand());
    return 0;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
34
What does the ungetc function return for the following C expression?
ungetc(c, fp);//where declarations are int c and FILE *fp
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
35
If the user enters 1 3.2 s, what value will be returned by the scanf()?
scanf("%d %f %c", &s1, &s2, &s3);
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
36
Why do we write (int *) before malloc?
int *ip = (int *)malloc(sizeof(int));
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
37
What type of inputs are accepted by mathematical functions?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
38
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    FILE *fp;
    char c;
    int n = 0;
    fp = fopen("newfile1.txt", "r");
    while (!feof(fp))
    {
        c = getc(fp);
        putc(c, stdout);
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
39
What will be the output for the given code.
printf("\n The number is %07d",1212);
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
40
Which of the following will return a result most quickly for searching a given key?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board