C programming examples with output
Local Variables
Program
#include<stdio.h>
#include<conio.h>
void fun1();
void fun2();
main()
{
int t;
clrscr();
t=1000;
fun2();
printf("\n");
printf("%d",t);
getch();
}
void fun1()
{
int t;
t=10;
printf("%d",t);
}
void fun2()
{
int t;
t=100;
fun1();
printf("\n");
printf("%d",t);
}
Output:
10
100
1000
Local Variables
Program
#include<stdio.h>
#include<conio.h>
void fun1();
void fun2();
main()
{
int t;
clrscr();
t=1000;
fun2();
printf("\n");
printf("%d",t);
getch();
}
void fun1()
{
int t;
t=10;
printf("%d",t);
}
void fun2()
{
int t;
t=100;
fun1();
printf("\n");
printf("%d",t);
}
Output:
10
100
1000
0 komentar:
Post a Comment