ExamVeda
Login
Home
11
What will be the output of the following C code?
#include <stdio.h>
    int main()
    {
        int y = 10000;
        int y = 34;
        printf("Hello World! %d\n", y);
        return 0;
    }
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
12
Which of the following is NOT possible with any 2 operators in C?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
13
What will be the final value of c in the following C code snippet? (Initial values: a = 1, b = 2, c = 1)
c += (-c) ? a : b;
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
14
Arithmetic operations such as addition, subtraction, multiplication and division are allowed on enumerated constants.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
15
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int x = 5.3 % 2;
    printf("Value of x is %d", x);
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
16
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int const k = 5;
    k++;
    printf("k is %d", k);
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
17
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 2, y = 0;
    int z = x && y = 1;
    printf("%d\n", z);
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
18
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int b = 5 - 4 + 2 * 5;
    printf("%d", b);
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
19
What will be the output of the following C code?
#include<stdio.h>
enum Shyam
{
    a,b,c=5
};
enum Shyam s;
main()
{
    c++;
    printf("%d",c);
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
20
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    const int i = 10;
    int *ptr = &i;
    *ptr = 20;
    printf("%d\n", i);
    return 0;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board