patternprogram_410 softethics

Pattern 410 (String Pattern)

C

#include <stdio.h>
#include <string.h>

int main()
{
  char str[] = "SUMIT";
  int len = strlen(str);
  int i,j;

  for(i = 0; i < len; i++)
  {
    for(j = 0; j < len; j++)
    {
      printf("%c ", str[j]);
    }
    printf("\n");
  }
  return 0;
}

C++

Java

C#

Python

0 0 votes
Rate this Program
Subscribe
Notify of
guest


0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments