Arya Kumar
Member level 4
Code:
#include <stdio.h>
//int sum(int);
int i;
void main()
{
//int d=sum(10);
volatile int a =10;
if(a==10)
{
a=20;
printf("good morning how are you");
}
else if(a==20)
{
printf("hello buddy");
}
else
{;}
}
I am expedting that both condition will be executed. As i have declared it volatile.
but this doesnt happen.
please explain..
FYI, C code Gcc compiler.