extern static int i
func()
{
i =10;
i++;
printf("%d \n",i);
}
main()
{
i =20;
printf("%d \n",i);
func();
printf("%d \n",i);
}
Answers were Sorted based on User's Feedback
Answer / vadivelt
Program should give compiler error. Cos, u r trying to
allocate two different storage area to sigle int
variable 'i'.
ie.,
The below statement is invalid.
extern static int i;
Is This Answer Correct ? | 8 Yes | 1 No |
what are the static variables
8 Answers HCL, iFlex, TCS, Wipro,
write the program for maximum of the following numbers? 122,198,290,71,143,325,98
What's the difference between constant char *p and char * constant p?
Does c have class?
Explain the use of fflush() function?
Define Spanning-Tree Protocol (STP)
#ifdef TRUE int I=0; #endif main() { int j=0; printf("%d %d\n",i,j); }
can we write a c program with out using main
can we implement multi-threads in c.
Is there something we can do in C but not in C++? Declare variable names that are keywords in C++ but not C.
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
Write a Program to accept different goods with the number, price and date of purchase and display them