C Programming :: Operators Expressions

Home > C Programming > Operators Expressions > General Questions

1 / 5

 #include
int main()
{
int x=20,y=35;
x=y++ + x++;
y=++y + ++x;
printf("%d %d",x,y);
return 0;
}

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

2 / 5

 What will be value of count after the following C program is executed?

void main()
{
int count, digit = O;
count= 1;
while (digit <= 9){
printf ("%d/n", ++count);
++ digit;
}

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace


Tags:  No Tags on this question yet!

3 / 5

 How many times will the printf statement be executed?

void main()
{
int n; n=10;
while(n < 10){
printf ("hello");
--n;
} }

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace


Tags:  No Tags on this question yet!

4 / 5

 What is the final value of digit?

void main()
{
int digit
for (digit = 0; digit < = 9; ++digit)
printf ("%d/n", digit);
digit = 2*digit;
- - digit;
}

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace


Tags:  No Tags on this question yet!

5 / 5

 What is the output of the following 'C' program ?

#include
int main()
{
int k=5;
for(++k<5 && k++/5 || ++k<8);
printf("%d\n",k);
}

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace


Tags:  Global Edge

6 / 5

 Predict the output of following "C" code:

main()
{
int x,a=10;
x=9*5+ 7/3 -6+a;
printf("%d",x);
}

Answer: Option A

Explanation:

45+2-6+10 = 51
7/3 =2 int division

Workspace


Tags:  TCS

7 / 5

 Which among the following operator has the right to left associativity?

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace


Tags:  TCS