Multiple choice technology programming languages

LINE:1 i=1, line=5; LINE:2 for(i=1;i<=line;i++) LINE:3 { LINE:4 for(j=1;j<=line- i;j++) LINE:5 { LINE:6 printf(" " ); LINE:7 } LINE:8 for(j=1;j<=i;j++) LINE:9 { LINE:10 printf(""); LINE:11 } LINE:12 line--; LINE:13 printf("\n"); LINE:14 } this will print: * * *** **** ***** Now change the code in such a way that by using only one key for once such that this code will print: * * * * * * * * * * * * * * * In which line you need to change the code using that key?

  1. LINE15

  2. LINE10

  3. LINE13

  4. LINE9

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To print spaces between asterisks, line 10 (printf("")) needs modification to printf(" ") adding a space after each asterisk. This changes the output from a solid triangle to one with spaces between stars.