#include
#include
int num = 100 ; // Global
void func(); // Prototype
void main()
{
int num = 20; // Local to main
{
int x = 30 ; // Local to Inner Part
printf("%d ",num);
func();
}
printf("%d ",num);
}
void func()
{
printf("%d ",num);
}
Output : 30 100 20
Bookmark & Share

About the author: Pritesh View all posts by Pritesh
My name is Pritesh Taral. I am working in well known MNC. as Java Developer. I am part time blogger loves writing articles on C/C++. I am active on facebook using community fan page .One can Visit me @ Facebook
Facebook Fan Page