Hollow rectangular shaped star pattern – C Program



About this program:

This program generates a hollow rectangular box pattern which contains only stars. Unlike the previous program, here we are going leave the inner  portion blank. This program will contain 6 rows and 6 columns. This pattern will look something like this:


Here in this program, we are going to use two “for..loops”. One for rows and one for columns. But the condition is, we will only print ‘*‘, if i ==6 or j==6 or i==6 or j==6. Otherwise,  a blank space will be printed.
If you need a more detailed explanation, please see this java program on the same pattern.




You May Also Like

Leave a Reply

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