0% found this document useful (0 votes)
38 views3 pages

Assignment 123

The document contains 50 programming problems covering arrays, strings, inheritance, constructors, patterns, and other core programming concepts. The problems include tasks like taking integer inputs from the user and storing them in arrays, searching arrays, splitting arrays, string operations like length, comparison, reversing, and more. Constructors covered include default, parameterized, copy, and overloaded constructors. Inheritance concepts covered are single, multi-level, multiple and hybrid inheritance. Patterns covered include half pyramid, asterisk, diamond, natural numbers, Pascal triangle and alphabets.

Uploaded by

Adesh Dhakane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views3 pages

Assignment 123

The document contains 50 programming problems covering arrays, strings, inheritance, constructors, patterns, and other core programming concepts. The problems include tasks like taking integer inputs from the user and storing them in arrays, searching arrays, splitting arrays, string operations like length, comparison, reversing, and more. Constructors covered include default, parameterized, copy, and overloaded constructors. Inheritance concepts covered are single, multi-level, multiple and hybrid inheritance. Patterns covered include half pyramid, asterisk, diamond, natural numbers, Pascal triangle and alphabets.

Uploaded by

Adesh Dhakane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment

1.Take 10 integer inputs from user and store them in an array and print them on screen.
2.Take 10 integer inputs from user and store them in an array. Again ask user to give a number. Now, tell user
whether that number is present in array or not.
3.Take 20 integer inputs from user and print the following:
number of positive numbers
number of negative numbers
number of odd numbers
number of even numbers
number of 0.
4.Take 10 integer inputs from user and store them in an array. Now, copy all the elements in another array but in
reverse order.
5.Write a program to find the sum and product of all elements of an array.
6.Initialize and print all elements of a 2D array.
7.Find largest and smallest elements of an array.
8.Write a program to check if elements of an array are same or not it read from front or back. E.g.-
2 3 15 15 3 2

9Take an array of 10 elements. Split it into middle and store the elements in two dfferent arrays. E.g.-
INITIAL array :

58 24 13 15 63 9 8 81 1 78

After spliting :

58 24 13 15 63

9 8 81 1 78

10.Consider an integer array, the number of elements in which is determined by the user. The elements are also
taken as input from the user. Write a program to find those pair of elements that has the maximum and minimum
difference among all element pairs.

11.If the input array is [10, 12, 20, 30, 25, 40, 32, 31, 35, 50, 60], your program should be able to find that the
subarray lies between the indexes 3 and 8.

12.Write a program to print sum, average of all numbers, smallest and largest element of an array.

13. Write a program to find the length of string

14. Write a program to display string from backward

15. Write a program to count number of words in string

16. Write a program to concatenate one string contents to another

17. Write a program to compare two strings they are exact equal or not.
18. Write a program to check a string is palindrome or not.

19. Write a program to find a substring within a string. If found display its starting position.

20. Write a program to reverse a string

21. Write a program to convert a string in lowercase

22. Write a program to convert a string in uppercase

23.What is diff b/w overloading and overriding?


24. Write a loop statement that will show the following output:

12

123

1234

12345

25. Print all permutation of String both iterative and Recursive way?

26. How to count occurrence of a given character in a String?

27. Given two arrays, 1,2,3,4,5 and 2,3,1,0,5 find which number is not present in the
second array.
28. How to find top two maximum number in array?

29. C++ program to demonstrate example of Default Constructor or No argument


30. C++ program to demonstrate example of parameterized constructor.
31. C++ program to demonstrate example of copyconstructor.
32. C++ program to demonstrate example of constructor overloading.
33. C++ program to demonstrate example of member initalizer list.
34. Display patient details.
35. Demonstrating single inheritance
36. Multi-level inheritance
37. Menu driven program using inheritance
38. Create item-wise bill
39. Program using friend function
40. Display employee details
41. Bank application
42. Implement multilevel inheritance
43. Demonstrate multiple inheritance
44. Demonstrate hybrid inheritance
45. Print half pyramid
46. Print asterisk patterns
47. Print diamond pattern
48. Print natural numbers pattern
49. Print Pascal triangle
50. Print alphabets pattern

You might also like