Sail E0 Webinar
Question

What will be output if you compile following c code ?


void main()
{
int const SIZE=5;
int expr;
double value[SIZE]={2.0,4.0,6.0,8.0,10.0};
expr=1|2|3|4;
printf("%f",value[expr]);
}


Options:
A .  2.000000
B .  4.000000
C .  8.000000
D .  Compile Errror
Answer: Option D

Size of any array in c cannot be
constantan variable.




Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers