home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C Programming Starter Kit 2.0
/
SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso
/
tyc
/
list5_3.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-16
|
501b
|
26 lines
/* Demonstrates local variables. */
#include <stdio.h>
int x = 1, y = 2;
void demo(void);
main()
{
printf("\nBefore calling demo(), x = %d and y = %d.", x, y);
demo();
printf("\nAfter calling demo(), x = %d and y = %d.", x, y);
}
void demo(void)
{
/* Declare and initialize two local variables. */
int x = 88, y = 99;
/* Display their values. */
printf("\nWithin demo(), x = %d and y = %d.", x, y);
}