ExamVeda
Login
Home
41
Comment on the following statement.
n = 1;
printf("%d, %dn", 3*n, n++);
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
42
Which of the following format identifier can never be used for the variable var?
#include <stdio.h>
int main()
{
    char *var = "The quick brown fox jumps over the lazy dog";
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
43
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int x = 1, z = 3;
    int y = x << 3;
    printf(" %d\n", y);
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
44
What will be the output of the following C code?
#include <stdio.h>
#include <string.h>
int main()
{
    char *str = "x";
    char c = 'x';
    char ary[1];
    ary[0] = c;
    printf("%d %d", strlen(str), strlen(ary));
    return 0;
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
45
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 2, y = 2;
    x /= x / y;
    printf("%d\n", x);
    return 0;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
46
Which of the following operators has an associativity from Right to Left?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
47
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 3, i = 0;
    do {
        x = x++;
        i++;
    } while (i != 3);
    printf("%d\n", x);
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
48
Which of the following declaration is not supported by C?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
49
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int a = 5, b = -7, c = 0, d;
    d = ++a && ++b || ++c;
    printf("\n%d%d%d%d", a, b, c, d);
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
50
What will be the output of the following C code?
#include <stdio.h>
void foo(const int *);
int main()
{
    const int i = 10;
    printf("%d ", i);
    foo(&i);
    printf("%d", i);

}
void foo(const int *i)
{
    *i = 20;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board