Output
Output
Different shape:
1. Cuboid
2. Rectangle
3. Square
4. Exit
Enter your choice: 1
Enter the L, B and H (respectively):20 30
40
67
21
34
Accept Choice 1
Enter Account Number: 17534
Enter Principal:
10000
15000
Program-5
Enter Patient's Name: Karthikka
Enter Patient's Age: 17
Enter the no. of days Patient Stay: 3
Enter the problem the Patient is suffering from: Fever
Enter Patient's Address: 21 Nehru st., Hosur
Patient's Name: Karthikka
Patient's Age: 17
No. of days Patient Stays: 3
Total Charge is: 3000
Illness is: Fever
Patient's Address is: 21 Nehru st., Hosur
Program-6
Enter desired array size (max.50)...
9
Enter array elements
45
78
33
12
24
98
86
69
50
Enter element to be searched for...86
Element found at Index: 6, Position: 7
Program-7
Enter desired array size (max50)...12
Enter array elements (must be in Ascending Order)...
10
20
30
40
50
60
70
80
90
100
110
120
Enter element to be searched for...30
Element found 2, Position: 3
Program-8
How many elements do u want to create array with?(max.50)...8
Enter array elements...
24
90
76
543
45
12
10
52
Array
Array
Array
Array
Array
Array
Array
after
after
after
after
after
after
after
pass-1-is:
pass-2-is:
pass-3-is:
pass-4-is:
pass-5-is:
pass-6-is:
pass-7-is:
10
10
10
10
10
10
10
90
12
12
12
12
12
12
76
76
24
24
24
24
24
543
543
543
45
45
45
45
45
45
45
543
52
52
52
12
90
90
90
90
76
76
24
24
76
76
76
90
90
52
52
52
52
543
543
543
Program-9
Program using Bubble sort
Enter how many number of city names:
3
Enter the City Names:
mumbai
delhi
chennai
1.Bubble Sort 2.Exit
Enter choice(1 or 2): 1
chennai mumbai
chennai delhi
chennai delhi
Wish to continue:
delhi
mumbai
mumbai
n
Program-10
How many elements do u want to create array with?(max.50)...7
Enter aray elements..
97
16
76
33
15
85
53
Array
Array
Array
Array
Array
Array
Array
after
after
after
after
after
after
after
pass-1-is:
pass-2-is:
pass-3-is:
pass-4-is:
pass-5-is:
pass-6-is:
pass-7-is:
97
16
16
16
15
15
15
16
97
76
33
16
16
16
76
76
97
76
33
33
33
33
33
33
97
76
76
53
15
15
15
15
97
85
76
85
85
85
85
85
97
85
53
53
53
53
53
53
97
Program-11
How many elements do u want to create first array with?(maX50)...5
Enter first array elements [ascending]...
11
22
33
44
55
How many elements do u want to create second array with?(max50)..7
Enter second array elements [descending]...
75
65
55
45
35
25
15
The Merged array is as shown below..
11 15 22 25 33 35 44 45
55
55
65
75
Program-12
Input Row & Column of A Matrix: 2 3
Input Row & Column of B Matrix: 3 2
Matrices can be multiplied.
Input Matrix-A:
2
4
6
8 10 12
Input Matrix-B:
1
3
5
7
9 11
Product of A & B Matrices:
76
100
166
226
Program-13
String operations using pointers.
1. Find Length. 2. Copy String. 3. Reverse
4. Join String.
Enter choice: 1
Enter string: Object Oriented Program
23
Do you want to continue...y
1. Find Length. 2. Copy String. 3. Reverse
4. Join String.
Enter choice: 2
Enter string: C++
C++
Do you want to continue...y
1. Find Length. 2. Copy String. 3. Reverse
4.Join String.
Enter choice: 3
Enter string: India
aidnI
Do you want to continue...y
1. Find Length. 2. Copy String. 3. Reverse
4. Join String.
Program-14
Program using Text File
Enter the String:
Continue...
Keyboard
Continue...
n
All are Indians
Object oriented Programming
Keyboard
No. of lines starting with A or a:
Total no. of vowels:
18
Program-15
Program using Binary File
1. Write Sports details 2.Write Athletic
3. Display Athletics
Enter choice... 1
Enter Event and Athlet Name: Football
Hendry
Continue(y/n)...? y
Enter Event and Athlet Name: athletic
Usain Bolt
Continue(y/n)...? n
Do u want to continue...? y
Program using Binary File
1. Write Sports details 2.Write Athletic
3. Display Athletics
Enter choice... 2
Do u want to continue...? y
Program using Binary File
1. Write Sports details 2.Write Athletic
3. Display Athletics
Enter choice... 3
Event: athletic
Athlet Name: Usain Bolt
Do u want to continue...? n
Program-16
Program using stack as an array of objects
1. Push 2. Pop 3. Display
Enter choice... 1
Enter the customer no. 1234
Enter the customer Name:
Chethan
Enter choice... 1
Ravendar
Enter choice... 3
1234
Name: Chethan
Age:
25
Customer no:
2313
Name: Ravendar
Age:
35
Continue:
y
1. Push 2. Pop 3. Display
Customer no:
Enter choice... 2
2313
Name: Ravendar
Age:
35
Continue:
y
1. Push 2. Pop 3. Display
Customer no:
1234
Name: Chethan
Age:
25
Continue:
Enter choice... 3
Program-17
1.Push 2.Pop 3.Display
Enter your Choice:
1
Enter the values of C_no. & C_Name:123
Madhu
Wish to Continue...
y
1.Push 2.Pop 3.Display
Enter your Choice:
1
Enter the values of C_no. & C_Name:342
Dharshana
Wish to Continue...
y
1.Push 2.Pop 3.Display
Enter your Choice:
1
Enter the values of C_no. & C_Name:234
Sahana
Wish to Continue...
y
1.Push 2.Pop 3.Display
Enter your Choice:
10
10<-
15
10<-
15<-
20
Program-19
Program using queue as linked list
1.insert 2.delete 3.display
Enter the choice:1
Enter the values for pincode and name
001
Chennai
Try again:y
1.insert 2.delete3.display
Enter choice:1
Enter the values for pincode and name
002
Madurai
Try again:y
1.insert 2.delete3.display
Enter choice:3
Pincode:1
Name of the city : Chennai
Pincode:2
Name of the city : Madurai
Try again:y
1.insert 2.delete3.display
Enter choice:2
Try again:y
1.insert 2.delete3.display
Enter choice:3
Pincode:2
Name of the city : Madurai
Program-20
1. Insert
2.Delete
Enter Your Choice:
1
Enter Player Id:
Continue...(y/n)...?
10
Continue...(y/n)...?
11
Continue...(y/n)...?
Madhu
3.Display
4.Exit
Sahana
1.Insert
2.Delete
Enter Your Choice:
1
Enter Player Id:
4.Exit
1. Insert
2.Delete
Enter Your Choice:
1
Enter Player Id:
3.Display
12
y
3.Display
4.Exit
Sapna
1. Insert
2.Delete
Enter Your Choice:
3
Player ID:
10
Player ID:
11
Player ID:
12
3.Display
4.Exit
Continue...(y/n)...? y
1. Insert
2.Delete
Enter Your Choice:
2
Player Id:
10
Continue...(y/n)...?
3.Display
4.Exit
Player Name:
Madhu
1. Insert
2.Delete
Enter Your Choice:
3
3.Display
4.Exit
Player ID:
11
Player Name:
Sahana
Player ID:
12
Player Name:
Sapna
Continue...(y/n)...?