extern static int i
func()
{
i =10;
i++;
printf("%d \n",i);
}
main()
{
i =20;
printf("%d \n",i);
func();
printf("%d \n",i);
}
Answer Posted / 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 |
Post New Answer View All Answers
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
How do you define CONSTANT in C?
Explain c preprocessor?
Place the #include statement must be written in the program?
Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?
What are extern variables in c?
What are identifiers and keywords in c?
Does c have class?
What is the acronym for ansi?
What are the types of operators in c?
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
Write a simple code fragment that will check if a number is positive or negative.
Explain null pointer.
What is the use of a static variable in c?
Describe the order of precedence with regards to operators in C.