What would be the output of the nested for loop given below?

What would be the output of the nested for loop given below?
for (( i=1; i<=5; i++ ))
do
for (( j=1; j<=i; j++ ))
do
echo -n “$j”
done
echo ” “
done

What would be the output of the nested for loop given below?
for (( i=1; i<=5; i++ ))
do
for (( j=1; j<=i; j++ ))
do
echo -n “$j”
done
echo ” “
done

A.
112123123412345

B.
123451234123121

C.
1234512345123451234512345

D.
123451234123123412345

Explanation:



Leave a Reply 0

Your email address will not be published. Required fields are marked *