Just Programming
Pages
Home
C C++ Topics
JAVA Aptitude
Assaan IT Solutions
My Facebook Group
My Site
Wednesday, 13 March 2013
Global Variables same name 2
#include
<stdio.h>
static
num=5;
extern
int
num;
int
main()
{
printf(
"%d"
,num);
return
0;
}
int
num =25;
Compilation error
Explanation:
Two or more global variables can have same name but we can initialize only one of them.
Blog Author:
Vijay Kumar
Go to:
Java Aptitude
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment