Professional Documents
Culture Documents
These are some simple and basic programming questions which you may think as a start to
your campus placements’ preparations. You may face these kinds of coding questions in
different tests. These questions are an indication, a suggestion, please don’t limit yourself to
these questions only. Be inquisitive ! Practice more !
1. Input : N = 5
Output :
*
**
***
****
*****
2. Input : N = 5
Output :
*****
****
***
**
*
3. Input : N = 4
Output :
####
####
####
####
4. Input : N=4
Output :
####
####
####
####
6. Input : N=4
Output :
X
XXX
XXXXX
XXXXXXX
7. Input : N = 4
Output :
X
XXX
XXXXX
XXXXXXX
XXXXX
XXX
X
9. Input : N = 5
Output :
1
10
101
1010
10101
11. Input : N = 5
Output :
1
23
456
7 8 9 10
11 2 13 14 15
14. Input : N = 3
Output :
5
5 10
5 10 15
5 10
5
F
U
T
U
R
E
C C
R R
O
S S
S S
20. Input : N = 5
Output :
1
24
369
4 8 12 16
5 10 15 20 25
21. Input : N = 3
Output :
1112
3222
3334
22. Input : N = 4
Output :
1111
222
33
4
23. Input : N = 4
Output :
1444
1233
1232
1234
25. Input : N = 5
Output :
1
11
121
1331
14641
26. Input : N = 5
Output :
12345
11 12 13 14 15
21 22 23 24 25
16 17 18 19 20
6 7 8 9 10