[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C Programming :: Increment-Decrement - Discussion

Home > C Programming > Increment-Decrement > MCQs Questions Discussion

8 / 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);
}

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 ::

Post Your Answer Here:     

Reply    
Rate This: +1 -3 +
    Report


Report Error

Please Login First Click Here