Question: what is the error following code segmnet? int x=1,y; for (;x>10,x++) y+=2; A)for (;x>10;x++) should be replaced by for (int x=1;x>10;x++) and int x=1 should

 what is the error following code segmnet?int x=1,y; for (;x>10,x++) y+=2;
what is the error following code segmnet?
int x=1,y;
for (;x>10,x++)
y+=2;
A)for (;x>10;x++) should be replaced by for (int x=1;x>10;x++) and int x=1 should be removed .
B) x++ should be repleaced by ++x
C) Infinite Loop; x++ can be replaced by x--
D) for ( ;x>10;x++) should be replaced by for (int x=1; x>10; x++)
A)for (;x>10;x++) should be replaced by for (int x=1;x>10;x++) and int x=1

13 What is the error in the following code regment? int x=1.y : fortxin-10x+4 y+=2 2. fortx>10x++) should be replaced by forlint x+1,x>10x++) and int x=1 should be rerrovrd b. xe+ should be replaced by ++x c. Infinite toop x++ can be replaced by x d. forbosioxt+1) thould be replaced by forint x+1;x>10x++) Clear iny choice What is the error in the following code segment? int x=1,yi for( (x>10x++) y+=2 a. for (x>10;x++) should be replaced by for(int x=1x>10x++) and int x=1 should be removed b. x++ should be replaced by ++x c. Infinite Loop, x++ can be replaced by x d. for( x>10,x++) should be replaced by for(int x=1,x>10x+t) Clearmy choice

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 Databases Questions!