a)
Code:
#include<stdio.h>
int i=5;
void main()
{
int i=6;
printf("%d",i);
}
b)
Code:
#include<stdio.h>
void main()
{
extern int i;
int i=6
printf("%d",i);
}
int i=5;
|
Go4Expert Member
|
|
| 2Oct2007,23:41 | #1 |
|
These are the two codes...
a) Code:
#include<stdio.h>
int i=5;
void main()
{
int i=6;
printf("%d",i);
}
b) Code:
#include<stdio.h>
void main()
{
extern int i;
int i=6
printf("%d",i);
}
int i=5;
Last edited by shabbir; 3Oct2007 at 04:10.. Reason: Code block |
|
Team Leader
|
![]() |
| 3Oct2007,01:22 | #2 |
|
Read up on scope. Learn to put your code in code tags.
|