+ 3
If x=0;what is the value of while(x<5) x++; cout <<"x";
Its a while____ which will run __time and will give output=?
10 Answers
+ 4
Aziz mobarek your answer is wrong. You will se that why wrong if you try this code
True: output is 1-2-3-4-5
+ 3
if your question like thisđ
if(x=0)
{
while(x<5)
{
x++;
cout<<x;
}
}
then answer will be 1,2,3,4,5
+ 2
the value of x incrementing before cout<<x; in while loop
so the first number will
0+1=1
second will
1+1=2
third number will
2+1=3
fourth number will
3+1=4
here the while condition is 0 up-to 5
so the answer is 12345
+ 1
while loop will run 5 times and will give a output of 4.
+ 1
Its a while loop which will run 5 times and will give output = 4
+ 1
x
+ 1
01234
+ 1
holađ
+ 1
Ur right mohommd ji
0
If x++ is before cout<<"x" ; then
Output
1-2-3-4-5