Computer Science, asked by pratyush0705pdpx7k, 1 year ago

In this question, else belongs to which if?

int i=2;
if(i>0)
if(i>1)
i++;
else
i=0;

Answers

Answered by abhishekvashispdhjwk
0
first iteration "if", as second "if" is completed at i++

abhishekvashispdhjwk: google evertime you find a problem you'll become genius too
pratyush0705pdpx7k: program will run
abhishekvashispdhjwk: there are no preprocessor directive defined
pratyush0705pdpx7k: its just a block of statement.... along with a complete body of program it will run
Answered by Sampriti395
0
There should be an else statement and then statement for each if statement
Similar questions