Computer Science, asked by vaishanvihonnungar, 4 days ago

which of the following expressions is legal. in C++
1. x=(y==z)
2. float y=12.67
3. for(i=10;I==1;I=4)
4. bool(x) =(bool) 10;​

Answers

Answered by kpandiyan021
0

Answer:

boox =(bool) 10

Explanation:

is the correct answer

Answered by ankhidassarma9
0

Answer:

float y=12.67  is legal expression in C++.

Explanation:

  • '=' is an assignment operator whose right side value should be assigned to the variable in the left side.'==' is a comparison operator.

       So, x=(y==z) is not valid.

  • for(i=10;I==1;I=4) is not valid as the syntax of 'for' statement is :  for(initialization; condition checking; increment or decrement)
  • 'Boolean' type variable stores the value True(1) or False(0). So, bool(x) =(bool) 10 is an invalid expression.

Similar questions