Programming questions by Deepak Mitra
List of star pattern programming exercises
*****
*****
*****
*****
*****
Square Star Pattern
*****
* *
* *
* *
*****
Hollow Square Star Pattern
*****
** **
* * *
** **
*****
Hollow Square Star Pattern with Diagonal
*****
*****
*****
*****
*****
Rhombus Star Pattern
*****
* *
* *
* *
*****
Programming questions by Deepak Mitra
Hollow Rhombus Star Pattern
*****
*****
*****
*****
*****
Mirrored Rhombus Star Pattern
*****
* *
* *
* *
*****
Hollow Mirrored Rhombus Star Pattern
*
**
***
****
*****
Right Triangle Star Pattern
*
**
* *
* *
*****
Hollow Right Triangle Star Pattern
*
**
***
****
*****
Programming questions by Deepak Mitra
Mirrored Right Triangle Star Pattern
*
**
* *
* *
*****
Hollow Mirrored Right Triangle Star Pattern
*****
****
***
**
*
Inverted Right Triangle Star Pattern
*****
* *
* *
**
*
Hollow Inverted Right Triangle Star Pattern
*****
****
***
**
*
Inverted Mirrored Right Triangle Star Pattern
*****
* *
* *
**
*
Hollow Inverted Mirrored Right Triangle Star Pattern
*
***
*****
*******
Programming questions by Deepak Mitra
*********
Pyramid Star Pattern
*
* *
* *
* *
*********
Hollow Pyramid Star Pattern
*********
*******
*****
***
*
Inverted Pyramid Star Pattern
*********
* *
* *
* *
*
Hollow Inverted Pyramid Star Pattern
*
**
***
****
*****
****
***
**
*
Half Diamond Star Pattern
Programming questions by Deepak Mitra
*
**
***
****
*****
****
***
**
*
Mirrored Half Diamond Star Pattern
*
***
*****
*******
*********
*******
*****
***
*
Diamond Star Pattern
**********
**** ****
*** ***
** **
* *
* *
** **
*** ***
**** ****
**********
Hollow Diamond Star Pattern
*****
****
***
**
*
**
***
****
*****
Right Arrow Star Pattern
Programming questions by Deepak Mitra
*****
****
***
**
*
**
***
****
*****
Left Arrow Star Pattern
+
+
+
+
+++++++++
+
+
+
+
Plus Star Pattern
* *
* *
* *
* *
*
* *
* *
* *
* *
X Star Pattern
***
* *
* *
* *
***
* *
* *
* *
***
Eight Star Pattern
Programming questions by Deepak Mitra
***** *****
******* *******
********* *********
*******************
*****************
***************
*************
***********
*********
*******
*****
***
*
Heart Star Pattern
***** *****
******* *******
********* *********
********* *********
*****************
***************
*************
***********
*********
*******
*****
***
*
Heart Star Pattern with Name
Programming questions by Deepak Mitra
List of Number Patterns Programming
11111
11111
11111
11111
11111
Number pattern 1
11111
00000
11111
00000
11111
Number pattern 2
01010
01010
01010
01010
01010
Number pattern 3
11111
10001
10001
10001
11111
Programming questions by Deepak Mitra
Number pattern 4
11111
11111
11011
11111
11111
Number pattern 5
10101
01010
10101
01010
10101
Number pattern 6
11011
11011
00000
11011
11011
Number pattern 7
10001
01010
00100
01010
10001
Programming questions by Deepak Mitra
Number pattern 8
01110
10001
10001
10001
01110
Number pattern 9
11111
22222
33333
44444
55555
Number pattern 10
12345
12345
12345
12345
12345
Number pattern 11
12345
23456
34567
45678
56789
Programming questions by Deepak Mitra
Number pattern 12
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23 24 25
Number pattern 13
55555
54444
54333
54322
54321
Number pattern 14
12345
23455
34555
45555
55555
Number pattern 15
12345
23451
34521
45321
54321
Programming questions by Deepak Mitra
Number pattern 16
12345
21234
32123
43212
54321
Number pattern 17
555555555
544444445
543333345
543222345
543212345
543222345
543333345
544444445
555555555
Number pattern 18
1 2 3 4 5
16 17 18 19 6
15 24 25 20 7
14 23 22 21 8
13 12 11 10 9
Number pattern 19
Programming questions by Deepak Mitra
Triangle Easy Number Patterns
22
333
4444
55555
Number pattern 20
55555
4444
333
22
Number pattern 21
11111
2222
333
44
Number pattern 22
44
333
2222
11111
Programming questions by Deepak Mitra
Number pattern 23
12
123
1234
12345
Number pattern 24
12345
1234
123
12
Number pattern 25
21
321
4321
54321
Number pattern 26
54321
4321
321
21
1
Programming questions by Deepak Mitra
Number pattern 27
54
543
5432
54321
Number pattern 28
54321
5432
543
54
Number pattern 29
45
345
2345
12345
Number pattern 30
12345
2345
345
45
5
Programming questions by Deepak Mitra
Number pattern 31
23
345
4567
56789
Number pattern 32
56789
4567
345
23
Number pattern 33
13579
3579
579
79
Number pattern 34
Triangle 0,1 Easy Number Patterns
10
101
1010
10101
Programming questions by Deepak Mitra
Number pattern 35
00
111
0000
11111
Number pattern 36
01
010
1010
10101
Number pattern 37
11
101
1001
11111
Number pattern 38
Triangle Hard Number Patterns
123
12345
1234567
123456789
Programming questions by Deepak Mitra
Number pattern 39
24
135
2468
13579
Number pattern 40
131
13531
1357531
135797531
Number pattern 41
242
24642
2468642
2468108642
Number pattern 42
121
12321
1234321
123454321
Programming questions by Deepak Mitra
Number pattern 43
32
4543
567654
67898765
Number pattern 44
2 3
4 5 6
7 8 9 10
11 12 13 14 15
Number pattern 45
21
123
4321
12345
Number pattern 46
23
4567
89123456
7891234567891234
Programming questions by Deepak Mitra
Number pattern 47
1 1
12 21
123 321
1234 4321
1234554321
Number pattern 48
2 6
3 7 10
4 8 11 13
5 9 12 14 15
Number pattern 49
2 4
7 11 16
22 29 37 46
56 67 79 92 106
Number pattern 50
3 2
4 5 6
10 9 8 7
11 12 13 14 15
Programming questions by Deepak Mitra
Number pattern 51
22
333
2222
11111
Number pattern 52
N = 12345
12345
1234
123
12
Number pattern 53
N = 12345
12345
2345
345
45
Number pattern 54
Diamond Number Patterns
12
123
Programming questions by Deepak Mitra
1234
12345
1234
123
12
Number pattern 55
123
12345
1234567
123456789
1234567
12345
123
Number pattern 56
121
12321
1234321
123454321
1234321
12321
121
Programming questions by Deepak Mitra
Number pattern 57
*1*
*121*
*12321*
*1234321*
*123454321*
*1234321*
*12321*
*121*
*1*
Number pattern 58
Tricky Number Patterns
1 1
2 2
3 3
44
44
3 3
2 2
1 1
Number pattern 59
Programming questions by Deepak Mitra
C Programming Questions of Arrays
1. Find the minimum and maximum value from an 1-D integer Array
2. Find the sum of all integers in an 1-D integer Array.
3. Find the average of all the numbers in an integer Array.
4. Find the sum of even and odd numbers in an 1-D integer Array.
5. Find the sum of all prime numbers in an 1-D integer Array.
6. Display the array of integers in reverse order.
7. Sort an 1-D integer array
8. Count the number of occurrences of an integer in an 1-D integer array.
9. Copy the duplicate elements of an 1D integer array into another array.
10. Copy an 1-D integer array into another 1-D integer array.
11. Create two 1-D integer arrays A and B and sum the corresponding elements of the two arrays
and store it into the third array.
12. Create two 1-D integer arrays A and B and check they are equal or not.
13. Find the sum of numbers stored in even and odd indexes in an array.
14. Create a character array and count the number of vowels and consonants and numbers in the
array.
15. Create two character array A and B and concatenate the two arrays into third array C.
16. Write a C program to read and print elements of array.
17. Write a C program to print all negative elements in an array.
18. Write a C program to find sum of all array elements. - using recursion.
19. Write a C program to find maximum and minimum element in an array..
20. Write a C program to find second largest element in an array.
21. Write a C program to count total number of even and odd elements in an array.
Programming questions by Deepak Mitra
22. Write a C program to count total number of negative elements in an array.
23. Write a C program to copy all elements from an array to another array.
24. Write a C program to insert an element in an array.
25. Write a C program to delete an element from an array at specified position.
26. Write a C program to count frequency of each element in an array.
27. Write a C program to print all unique elements in the array.
28. Write a C program to count total number of duplicate elements in an array.
29. Write a C program to delete all duplicate elements from an array.
30. Write a C program to merge two array to third array.
31. Write a C program to find reverse of an array.
32. Write a C program to put even and odd elements of array in two separate array.
33. Write a C program to search an element in an array.
34. Write a C program to sort array elements in ascending or descending order.
35. Write a C program to sort even and odd elements of array separately.
36. Write a C program to left rotate an array.
37. Write a C program to right rotate an array.
List of matrix programming exercises
38. Write a C program to add two matrices.
39. Write a C program to subtract two matrices.
40. Write a C program to perform Scalar matrix multiplication.
41. Write a C program to multiply two matrices.
42. Write a C program to check whether two matrices are equal or not.
43. Write a C program to find sum of main diagonal elements of a matrix.
Programming questions by Deepak Mitra
44. Write a C program to find sum of minor diagonal elements of a matrix.
45. Write a C program to find sum of each row and column of a matrix.
46. Write a C program to interchange diagonals of a matrix.
47. Write a C program to find upper triangular matrix.
48. Write a C program to find lower triangular matrix.
49. Write a C program to find sum of upper triangular matrix.
50. Write a C program to find sum of lower triangular matrix.
51. Write a C program to find transpose of a matrix.
52. Write a C program to find determinant of a matrix.
53. Write a C program to check Identity matrix.
54. Write a C program to check Sparse matrix.
55. Write a C program to check Symmetric matrix.