Reads in the size of a square from the screen;
2. Prints a hollow square of that size out of “-“, “|” and
blanks on screen;
3. Prints the same hollow square onto a text file.
Your program should work for squares of all side sizes
between 1 and 20.

---
│ │
│ │
│ │
---


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ General Interview Questions

What is a loop? What are different types of loops in c++?

0 Answers  


How many lines of code you have written for a single program?

4 Answers   BoA,


What is the best way to declare and define global variables?

0 Answers  


What is the outcome of cout< a) 16 b) 17 c) 16.5

0 Answers  


find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.

0 Answers  






the maximum length of a character constant can be a) 2 b) 1 c) 8

0 Answers  


Can we use clrscr in c++?

0 Answers  


What does '\r' and '\b' mean? Please explain with example.

7 Answers  


What is the precedence when there is a global variable and a local variable in the program with the same name?

0 Answers  


How can you quickly find the number of elements stored in a static array? Why is it difficult to store linked list in an array?

0 Answers  


Why would you make a destructor virtual?

3 Answers   Lehman Brothers,


What does it mean to declare a destructor as static?

0 Answers  


Categories