What would be the output of the following program?
int x=40;
main()
{
int x=20;
printf("%d\n",x);
}
2. What would be the output of the following program?
main()
{
extern int i;
i=20;
printf("%d",sizeof(i));
}
main()
{
extern int fun(float);
int a;
a=fun(3.14);
printf("%d",a);
}
int fun(aa)
float aa;
{
return((int)aa);
}
main()
{
int a[5]={2,3};
printf("\n %d%d%d", a[2], a[3], a[4]);
}
main()
{
int i=1;
for(;;)
{
printf("%d",i++);
if(i>10)
break;
}
}