Computer Science, asked by itssme5399, 5 hours ago

QuestiHow many x are printed?for(i=0,j=10;i<j;i++,j--)printf("x");​

Answers

Answered by girijap27
0

Answer:

X is printed 5 times

Explanation:

i =0 , j=10 ; 0<10 condition is true

x is printed

after x is printed i =1, j=9

1<9 true

x

i=2, j=8

2<8 true

x

i=3,j=7

3<7 true

x

i=4, j=6

4<6 true

x

i=5,j=5

5<5 false

x is not printed when the condition fails and loop ends.

Similar questions