VOOZH about

URL: https://www.geeksforgeeks.org/c/name-pattern-program-in-c/

⇱ C program to print name pattern - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

C program to print name pattern

Last Updated : 23 Jul, 2025

The printing of patterns is the most common and interesting problem. This C program prompts users to input their names and transform each letter of the name into a visually appealing big star pattern.

For Example,

Input: NAME

Output:
 * * **** * * ******
 ** * * * ** ** *
 * * * ****** * ** * ****
 * ** * * * * *
 * * * * * * ******

Approach

  • The approach is to define the pattern for each alphabet.
  • After designing the pattern, the user is asked to enter their name.
  • For each character in their name, we print the corresponding pattern finally resulting in the name pattern.

We will use the switch statements, arrays and string parting in this program.

C Program to Print Name Pattern


Output

 **** ****** ****** * *
 * * * * *
 * ** **** **** ***
 * * * * * *
 **** ****** ****** * *

What a beautiful name you have!

To know more about pattern printing in C refer to pattern programs in c

Comment
Article Tags: