home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_04
/
allison
/
scope1.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1994-02-10
|
337 b
|
28 lines
LISTING 1 - Illustrates Local Scope
/* scope1.c: Illustrate local scope */
#include <stdio.h>
void f(int val);
main()
{
f(1);
return 0;
}
void f(int i)
{
printf("i == %d\n",i);
{
int j = 10;
int i = j;
printf("i == %d\n",i);
}
}
/* Output:
i == 1
i == 10
*/