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

A 0 

B 1 

C 2 

D Compilation error 

E None 

+ Answer
+ Explanation
+ Report
Total Preview: 1707

Copyright © 2024. Powered by Intellect Software Ltd