Top

Expressions

71.

What will be the output of the following program?

#include< stdio>

int main()
{
register int I = 2;
static char ch = ‘A’;
auto float j;
int k;
k = ++ch && I;
k = ++ch;
j = i-- + ++k * 2;
printf(“%d %f”, k , j);
return 0;
}

 

Answer: C

No answer description available for this question.

Enter details here

72.

Which of the following statement is correct about the code snippet given below?

#include < stdio>

int main()
{
int a = 10, b = 2, c;
a = !( c = c == c) && ++b;
c += ( a + b- -);
printf( “ %d %d %d”, b, c, a);
return 0;

}

 

Answer: A

No answer description available for this question.

Enter details here

73.

What will be the output of the following code?

static int I = 5;

main()
{
int sum = 0
do
{
sum + = (1/i);
}while(0 < I> printf(“sum of the series is %d”, sum);
}

 

Answer: C

No answer description available for this question.

Enter details here

74.

What is the difference between the following 2 codes?

//Program 1
    int main()
    {
        int d, a = 1, b = 2;
        d =  a++ + ++b;
        printf("%d %d %d", d, a, b);
    }

 //Program 2
    int main()
    {
        int d, a = 1, b = 2;
        d =  a++ + ++b;
        printf("%d %d %d", d, a, b);
    }

 

Answer: A

No answer description available for this question.

Enter details here

75.

Are logical operators sequence points?

Answer: A

No answer description available for this question.

Enter details here

Answer: B

No answer description available for this question.

Enter details here

77.

What is the value of the following expression?

i = 1;
i = ( I< <= 1 % 2)

Answer: A

No answer description available for this question.

Enter details here

78.

Expression x % y is equivalent to____?

Answer: B

No answer description available for this question.

Enter details here

79.

What is the output of this C code?   

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

 

Answer: B

No answer description available for this question.

Enter details here

80.

What is the output of this C code?  

int main()
    {
        int x = -2;
        if (!0 == 1)
            printf("yes\n");
        else
            printf("no\n");
    }

 

Answer: A

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