Professional Documents
Culture Documents
8. Write a program to accept a number and check and display whether it is a spy number or not. 13
9. Using switch statement, write a menu driven program for the following: 14
i) To find and display the sum of the series given below:
S = x1 – x2 + x3 – x4 + x5 … – x20
(where x=2)
10. Write a program to input integer elements into an array of size 20 and perform the following 16
operations:
12. Write a program to input forty words in an array. Arrange these words in descending order of 20
alphabets, using selection sort technique. Print the sorted array.
14. Using the switch statement, write a menu driven program for the following: 23
17. Write a program to accept a number and check and display whether it is a Niven number of not. 29
(Niven number is that number which is divisible by its sum of digits).
18. Write a program to initialize the seven Wonders of the World along with their locations in two 30
different arrays. Search for a name of the country input by the user. If found, display the name of
the country along with its Wonder, otherwise display “Sorry Not Found
19. Define a class ParkingLot with the following description: 32
20. Write two separate programs to generate the following patterns using iteration(loop) statements: 35
21. Write a program in to input and store all roll numbers, names and marks in 3 subjects of n number 37
of students in five single dimensional arrays and display the remark based on average marks as
given below
22. Design a class to overload a function Joystring() as follows 40
23. 43
Write a program to input twenty names in an array. Arrange these names in descending order of
alphabets , using the bubble sort technique.
24. Use switch statement,write a menu driven program to: 46
25. Using switch statement, write a menu driven program for the following: 49
i) To find and display the sum of the series given below:
26. Write a program to input integer elements into an array of size 20 and perform the following 51
operations:
27. Design a class to overload a function check() as follows: 54
28. Write a program to input forty words in an array. Arrange these words in descending order of 55
alphabets, using selection sort technique. Print the sorted array.
30. Using the switch statement, write a menu driven program for the following: 58
31. Special words are those words which starts and ends with the same letter. 61
Examples:
EXISTENCE
COMIC
WINDOW
ACKNOWLEDGEMENT
First of all, my heartfelt thanks to Mrs. Sakshi Rastogi who helped us in every
possible manner. He ensured a proper environment for us to work in.
We hereby declare that this submission is our own work and that,to the best of our
knowledge and belief, it contains no material previously published or written by
another person nor material which to a substantial extent has been accepted for the
award of any other Board of the school or other institute of higher learning, except
where due acknowledgement has been made in the text.
Signature: