Top

Expressions

31.

What is the final value of j in the below code?

int main()
    {
        int i = 0, j = 0;
        if (i && (j = i + 10))
            //do something
            ;
    }

 

Answer:

Enter details here

32.

What is the output of this C code?    

void main()
    {
        int k = 8;
        int x = 0 == 1 && k++;
        printf("%d%d\n", x, k);
    }

 

Answer: B

No answer description available for this question.

Enter details here

33.

What is the output of this C code  

void main()
    {
        unsigned int x = -5;
        printf("%d", x);
    }

 

Answer: C

No answer description available for this question.

Enter details here

34.

What is the output of this C code?    

void main()
    {
        int x = 0, y = 2, z = 3;
        int a = x & y | z;
        printf("%d", a);
    }

 

Answer: A

No answer description available for this question.

Enter details here

35.

What is the output of this C code?    

int main()
    {
        int x = 1, y = 0;
        x &&= y;
        printf("%d\n", x);
    }

 

Answer: A

No answer description available for this question.

Enter details here

36.

Operation “a = a * b + a” can also be written as:

Answer: D

No answer description available for this question.

Enter details here

37.

What is the output of this C code?   

 void main()
    {
        int x = 4;
        int *p = &x;
        int *k = p++;
        int r = p - k;
        printf("%d", r);
    }

 

Answer: C

No answer description available for this question.

Enter details here

38.

What will be the value of d in the following program?    

int main()
    {
        int a = 10, b = 5, c = 5;
        int d;
        d = b + c == a;
        printf("%d", d);
    }

 

Answer: B

No answer description available for this question.

Enter details here

39.

What is the output of this C code?  

void main()
    {
        int x = 4, y, z;
        y = --x;
        z = x--;
        printf("%d%d%d", x, y, z);
    }

 

Answer: D

No answer description available for this question.

Enter details here

40.

What is the output of this C code?    

void main()
    {
        char a = 'a';
        int x = (a )++;
        printf("%d\n", x);
    }

 

Answer: C

No answer description available for this question.

Enter details here

Loading…
Tags: Expressions Questions and Answers || Expressions MCQ Questions and Answers || Expressions GK Questions and Answers || Expressions GK MCQ Questions || Expressions Multiple Choice Questions and Answers || Expressions GK || GK on Expressions || C Programming Questions and Answers || C Programming MCQ Questions and Answers || C Programming GK Questions and Answers || GK on C Programming