Professional Documents
Culture Documents
Oops With C++ Questions Lab Manual Pcs-307
Oops With C++ Questions Lab Manual Pcs-307
Lab Manual
PCS-307
1. Write a C++ program to overload increment, decrement and
binary operators.
2. Write a C++ program to get the marks of a student in six
subjects and calculate the result.
3. Write a C++ program to check whether the entered number is
Armstrong or not.
4. Write a C++ program to take an input of object array and sort
the strings stored in it.
5. Write a C++ program to create static data members and
member functions and access them.
6. Write a C++ program to find the factorial of any given number.
7. Write a C++ program to find whether a enter year is a leap year
or not.
8. Write a C++ program to calculate area of square, area of
rectangle and area of circle using function overloading.
9. Write a C++ program to swap the values of any two variable
using call by reference.
10. Write a C++ program for array rotation.
11. Write a C++ program to remove the character from 1st
string which are present in 2nd string.
12. Write a C++ program the function power() to raise a
number m to a power n. the function take double value for m
and integer value for n and return the result correctly. Use a
default value of 2 for n to make the function to calculate squares
when this argument is omitted. Write a main function that gets
the values of m and n from the user to test the function.
13. Write a C++ program to reverse the array elements, which
are entered by the user.
14. Write a C++ program to change every letter in a given
string with the letter following it in the alphabet (i.e. a becomes
b, p becomes q, z becomes a).
15. Write a C++ program to count palindrome words in a
string. a. With the help of inbuilt functions of c++ libraries. b.
With the character array. (i.e. char ch[20]) c. With the string
data type. (i.e. string s)
16. Write a C++ program to multiply two 4x4 matrices and
print the matrix in the tabular form. i.e. 1 2 3 4 5
6 7 9 10 11 12 13 14 15 16 17