//==========================
//What will be the out put in C++, C or CPP
//1.Tricky for loop program
===========================
#include<stdio.h>
int main()
{
int i;
for(i=0;i<=5;i++); //when i=6 condition will become false and
//control flow will go next stmt to print once
{
printf("\n %d. Sonys",i);
}
return 0;
}
//=======================================
//2. Tricky for loop Program
//=======================================
#include<stdio.h>
int main()
{
int i;
for(;;)//infinite loop infinite times
//Manoj gets printed till stack over flow
{
printf("\n %d. Sonys",i);
}
return 0;
}
//=======================================
//3. Tricky for loop Program
//=======================================
#include<stdio.h>
int main()
{
int i;
for(;;); //infinite loop within without increment
//so control will not come out of loop and no o/p
{
printf("\n %d. Sonys",i);
}
return 0;
}
//What will be the out put in C++, C or CPP
//1.Tricky for loop program
===========================
#include<stdio.h>
int main()
{
int i;
for(i=0;i<=5;i++); //when i=6 condition will become false and
//control flow will go next stmt to print once
{
printf("\n %d. Sonys",i);
}
return 0;
}
//=======================================
//2. Tricky for loop Program
//=======================================
#include<stdio.h>
int main()
{
int i;
for(;;)//infinite loop infinite times
//Manoj gets printed till stack over flow
{
printf("\n %d. Sonys",i);
}
return 0;
}
//=======================================
//3. Tricky for loop Program
//=======================================
#include<stdio.h>
int main()
{
int i;
for(;;); //infinite loop within without increment
//so control will not come out of loop and no o/p
{
printf("\n %d. Sonys",i);
}
return 0;
}
No comments:
Post a Comment