C examples for Function:Local Variable
Demonstrates local variables within blocks.
#include <stdio.h> int main( void ) { int count = 0; printf("\nOutside the block, count = %d", count); {//from w w w . j a v a 2 s . c o m /* Define a variable local to the block. */ int count = 999; printf("\nWithin the block, count = %d", count); } printf("\nOutside the block again, count = %d\n", count); return 0; }