0% found this document useful (0 votes)
32 views

BCA semester data

The document lists 39 C++ programs covering various concepts such as input/output functions, object-oriented programming (OOP), prime number checking, factorial calculation, and class member functions. It includes examples of constructors, function overloading, friend functions, and error handling, among others. Each program serves as a practical demonstration of specific C++ features and programming techniques.

Uploaded by

adityachetry13
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)
32 views

BCA semester data

The document lists 39 C++ programs covering various concepts such as input/output functions, object-oriented programming (OOP), prime number checking, factorial calculation, and class member functions. It includes examples of constructors, function overloading, friend functions, and error handling, among others. Each program serves as a practical demonstration of specific C++ features and programming techniques.

Uploaded by

adityachetry13
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

C++

Programs: -

1. A program to understand Cin or Cout function in C++.

2. A program to demonstrate concept of OOPS.

3. A program to input 3 values from user and print the greatest, middle and lowest.

4. A Program to input a number from user and check the number is prime or not.

5. A program to input a number from user and prints its factorial.

6. A program to find the sum of 1 / factorial 1 + 2 / factorial 2 + 3 / factorial 3 to + n /

factorial n.

7. A program to understand how an object is used as a reference variable to reference the

class members outside the class.

8. A program to declare five integer variables in a class and input the values and print the

average.

9. A program to declare an integer array in a class and print the sum of all values.

10. A program to understand the error, private and protected members cannot access

directly by object using class reference.

11. A program where you define two classes. Both have a string variable, input 2 strings and

match these strings.

12. A program where you declare a 2D character as a global variable which store five

names, define a class where a string variable will input and match it in global 2D array.

13. A program to demonstrate global function.

14. A program where you define a global function which accept three integers and return

the greatest value.

15. A program where you pass a string in a global function as its parameter and counter the

repeated characters in that string.

16. A program to demonstrate class member function.

17.Declare an integer array as private in a class and return the greatest value of that array from
function of that class.

18. A program where you declare two strings as private in the class, and create a

function of that class and change the case of both strings.


19. A program to demonstrate inline function.

20. A program where you define an inline function with return the area of the circle, which takes the
radius and parameter.

21. A program which returns the average of four integer value input from user.

22. A program to demonstrate friend function.

23. A program where you define two classes each has a private string variable. And

concatenate those two strings.

24. A program where you define two classes each has a private integer variable. And print

the average of mean values of both classes.

25. A program to demonstrate default constructor.

26.Declare a string variable in a class and initialised your name on that variable in constructor and
print it from the function.

27. A program where you define an integer array in a constructor and perform the bubble

and insertion sort using two different functions.

28. A program to demonstrate parameterized constructor.

29.A program to demonstrate function overloading.

30.Define some function in class A. The first function print the sum of three integers, second function
print the sum of array.

31. A program where you define a Class match with two functions. The first function

matches the two input strings and the second function matches the repeated strings in

2D character array.

32. A program to demonstrate constructor overloading.

33.Define two constructor in a class the first constructor uses no parameters and second constructor
have an integer array parameter. The second constructor initialise the array of class. The two function
of class, The first function print the pyramid and the second function sort the array of class using
insertion sort.

34. A program where you define a class which has two strings variables and two different

functions. Where strings are initialized through constructor. And the first function counts

the common characters in these strings, while the second function prints the table of any

number.

35.A program to demonstrate returning a class type value.

36.Class A have an integer array and class B have function(method)which return class A in this
method input the values an integer array and return the sorted array using insertion sort.
37.Class A have a function which input three integer values and a string variable. Class B have a
function which return class A and it change the case value of string.

38.A program to demonstrate copy constructor.

39.Define two strings in a class and copy the value of strings from one object to another object.

You might also like