C Programming :: Increment-Decrement - Discussion
Home > C Programming > Increment-Decrement > MCQs Questions Discussion
11 / 45
What will be output of the following "c" code?
#include<stdio.h>
void main(){
int a[]={5,10,15};
int i=0,num;
num=a[++i]+ ++i+(++i);
printf("%d",num);
}
#include<stdio.h>
void main(){
int a[]={5,10,15};
int i=0,num;
num=a[++i]+ ++i+(++i);
printf("%d",num);
}
A6
B17
C16
D12
ECompilation error
Answer: Option (Login/Signup)
Show Explanation
where a[1]=10
so answer will be
a=10+2+3
a=15;
Asked In ::
SHORTCUT
its answers is 15. here num=a[1]+2+3;
where a[1]=10
so answer will be
a=10+2+3
a=15;
Read Full Answer
Report Error
Please Login First Click Here