Wednesday, September 3, 2008

Whatz wrong with this !!! How can I rectify it.

int a = 20;
void main ()
{
Fun1();
}
Fun1()
{
Static int b = a;
}

Choice
a) declare ‘int a’ inside the Fun1()
b) Make the ‘int a’ as ‘const int a = 20;’
c) Its illegal initialization of static variable. Initialize with constatnts
d) Its illegal initialization of static variable. Initialize with address of a

No comments: