home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C by Discovery (4th Edition)
/
C_By_Discovery_4th_Edition.tar
/
C_By_Discovery_4th_Edition
/
_DISK_
/
ch2
/
block2.c
< prev
next >
Wrap
C/C++ Source or Header
|
2005-06-16
|
485b
|
21 lines
/* block2.c
*
* Synopsis - This program will not compile.
*
* Objective - To illustrate the fact that variables declared
* inside a block are unknown by the rest of the
* program.
*/
/* Include Files */
#include <stdio.h>
int main( void )
{
{
int i; /* Note 1 */
scanf( "%d", &i );
}
printf( "i is %d.\n", i ); /* Note 2 */
return 0;
}