If the variable x contained the value of 1 what will be prin

If the variable x contained the value of 1, what will be printed in the following code? switch (x) {     case 1:                cout << “one” << endl;     case 2:                cout << “two” << endl;     case 3:                cout << “three” << endl;

Solution

no matter what the value of variable x is been assigned and break statement

the output will be like => one two three

If the variable x contained the value of 1, what will be printed in the following code? switch (x) { case 1: cout << “one” << endl; case 2: cout <

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site