BCA semester data
BCA semester data
Programs: -
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.
factorial n.
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
11. A program where you define two classes. Both have a string variable, input 2 strings and
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.
14. A program where you define a global function which accept three integers and return
15. A program where you pass a string in a global function as its parameter and counter the
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
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.
23. A program where you define two classes each has a private string variable. And
24. A program where you define two classes each has a private integer variable. And print
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
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.
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.
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.
39.Define two strings in a class and copy the value of strings from one object to another object.