Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

dry run for the given pattern code ?

+2 votes
asked Sep 23, 2019 by anonymous
/* Dry run for the given star pattern code with explanation of each line in brief*/

#include<stdio.h>

  int main(){

    char *str="*******************";

    int i,j, rows;

    printf("Enter the number of rows\n");

    scanf("%d", &rows);

    for(i = 0; i < rows; i++){

    printf("%*.*s\n", rows, i+1, str);

    }

   return 0;

}

1 Answer

0 votes
answered Oct 3, 2019 by Uzair Anwar (360 points)
1)first of all you will enter a number .

2)you will print space and *of size i from str

3)then print star of i which is increase.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...