[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 :: Arrays - Discussion

Home > C Programming > Arrays > MCQs Questions Discussion

11 / 55

What will be output of the following "c" code?

#include<stdio.h>
int main(){
int a[]={10,20,30,40};
int i=3,x;
x=1*a[--i]+2*a[--i]+3*a[--i];
printf("%d",x);
return 0;
}

A60

B50

C40

D30

ECompilation error

Answer: Option (Login/Signup)

Show Explanation

Asked In :: Societe Generale

Post Your Answer Here:     

Reply    
Rate This: +1 -0 +
    Report


Report Error

Please Login First Click Here