TOPUPchat logo...
Forgot password?

Select : C language | Java

Q.16] use of simple enum with soem output formating

#include
enum power{
    Dalai,
    Vladimir=3,
    Barack,
    Hillary
};
void main(){
    float leader[Dalai+Hillary]={1.f,2.f,3.f,4.f,5.f};
    enum power p=Barack;
    printf("%0.f",leader[p>>1+1]);
    getch();
}
    

Options]

A) 1
B) 2
C) 3
D) 4.f        

Click to See Answer
A) 1    

Next | command line argument simple question

Previous | unpredicated behaviour of character array in c

Hemen Ashodia [paper setter]
Register & recharge
Male Female
I agree Terms and Conditions