Question: Assume x is an integer variable. Consider the following two if - statements 1 . if ( x = = 0 ) {

Assume "x" is an integer variable. Consider the following two if-statements
1. if(x ==0){ cout <<"X is zero" << endl; }
and
2. if(x =0){ cout "X is zero" << endl; }
What is the difference between statement-1 and statement-2?
Your answer
Which one of those is an incorrect way to define an if-statement?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!