A
Q. Find the output of below program.
Code:
int main()
{
int i = 0, x = 0;
do
{
if(i % 5 == 0)
{
cout<<x;
x++;
}
++i;
}while(i<10);
cout<<x;
return 0;
}
{
int i = 0, x = 0;
do
{
if(i % 5 == 0)
{
cout<<x;
x++;
}
++i;
}while(i<10);
cout<<x;
return 0;
}
- Correct Answer - Option(C)
- Views: 25
- Filed under category C++
- Hashtags:
Discusssion
Login to discuss.