Today, i was a little bit surprised about the behavior of c structure vs c++ structure.
fun.cpp: http://ideone.com/5VLPC
struct nod
{
    static int i;
};
int main()
{
    return 0;  
}
The above program works perfectly.
BUT,
When the same program is run in C environment, it is giving the error:
prog.c:3: error: expected specifier-qualifier-list before ‘static’
see here: http://ideone.com/2JRlF
Why it is so?
 
     
     
     
    