Question:What will be output when you will execute following c code?
#include<stdio.h>
void main(){
     static int i;
     int j;
     for(j=0;j<=5;j+=2)
     switch(j){
        case 1: i++;break;
        case 2: i+=2;
        case 4: i%=2;j=-1;continue;
        default: --i;continue;
     }
     printf("%d",i); 
}
Choose all that apply: 

A 0 

B 1 

C 2 

D Compilation error 

E None 

+ Answer
+ Explanation
+ Report
Total Preview: 840

Copyright © 2024. Powered by Intellect Software Ltd