โ† IBM questions

Print hollow square star patterns

Filed under IBM

Given dimensions height and width, print a hollow rectangle of asterisks. The border should consist of '*' characters, while the interior should be empty spaces.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related IBM questions

Collected from public candidate posts and coding forums. Updated Nov 2026.