Question: multiple question(choose the correct answer : find out the logical error in the following line of code: if(x=10) { cout <

multiple question(choose the correct answer : find out the logical error in the following line of code: if(x=10) { cout<<"x is 10";}

none of these

assignment operator should not be used for comparison

10 should be enclosed in quotations

variable x should not be inside parenthesis

there is no semicolon at the end of if condition

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!