ExamVeda
Login
Home
31
Comment on the following 2 C programs.
#include <stdio.h> //Program 1
int main()
{
    int a;
    int b;
    int c;
}

#include <stdio.h> //Program 2
int main()
{
    int a;
    {
        int b;
    }
    {
        int c;
    }
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
32
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    static int x;
    printf("x is %d", x);
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
33
#include <somefile.h> are . . . . . . . . files and #include "somefile.h" . . . . . . . . files.
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
34
What will be the output of the following C code snippet?
#include (stdio.h)
void main()
{
    printf("hello");
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
35
What will be the output of the following C code?
#include <stdio.h>
#define foo(m, n) m ## n
void myfunc();
int main()
{
    myfunc();
}
void myfunc()
{
    printf("%d\n", foo(2, 3));
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
36
Register storage class can be specified to global variables.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
37
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    m();
    m();
}
void m()
{
    static int x = 5;
    x++;
    printf("%d", x);
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
38
Which of the following are C preprocessors?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
39
What will be the output of the following C code?
#include <stdio.h>
#define MIN 0
#ifdef MIN
#define MAX 10
#endif
int main()
{
    printf("%d %d\n", MAX, MIN);
    return 0;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
40
Which of the following function declaration is illegal?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board