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


Please Help Members By Posting Answers For Below Questions

The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?

773


How do you define CONSTANT in C?

655


Explain c preprocessor?

687


Place the #include statement must be written in the program?

576


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?

2177






What are extern variables in c?

551


What are identifiers and keywords in c?

575


Does c have class?

615


What is the acronym for ansi?

636


What are the types of operators in c?

616


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

609


Write a simple code fragment that will check if a number is positive or negative.

711


Explain null pointer.

625


What is the use of a static variable in c?

596


Describe the order of precedence with regards to operators in C.

636