PRACTICAL 1.
Write a C++ program to swap two numbers without using the third variable.
PRACTICAL 2.
Write a C++ program which takes input from user and shows whether a number is positive,
negative or zero.
PRACTICAL 3.
Write a program which takes input for 3 numbers and find the greatest among them.
PRACTICAL 4.
Write a program which takes marks as an input and calculates the grades of students based on
marks.
PRACTICAL 5.
Write a program in C++ and show whether the input character is vowel or consonant using
switch case.
PRACTICAL 6.
Write a C++ program to calculate the sum of the first 10 positive odd numbers.
PRACTICAL 7.
Write the program to print the factorial of an input number.
PRACTICAL 8.
Generate the following pattern by using nested For loop.
**********
**********
**********
**********
PRACTICAL 9.
Print the following format using nested for loop.
1
12
123
1234
12345
123456
1234567
PRACTICAL 10.
Print the following output by using nested for loop.
*
***
*****
*******
*********
PRACTICAL 11.
Print the following output by using nested for loop.
*
* *
* * *
* * * *
* * * * *
PRACTICAL 12.
Write a C++ program which stores numeric values in a one-dimensional array using for loop
and finds the highest, lowest and average values.
PRACTICAL 13.
Write a program to make a signup interference which takes user name, password, retype-
password as an input and compare the password and re-enter password of user for sign up,
using strings library.
PRACTICAL 14.
Write a program to add two matrices of order up to 4×4 using a two dimensional array and
show the ordered output in third matrix.
PRACTICAL 15.
Write a program involving use of user defined function to calculate volume of cylinder,
sphere and cube.
PRACTICAL 16.
Write a program involving user defined function to calculate average of given numbers.
PRACTICAL 17.
Write a program involving a user defined function to check whether the input number is a
prime number or not.
PRACTICAL 18.
Write a simple program using referencing and dereference operator to find the value and
address of each element of an array using pointers. (Hint: Use for loop)
PRACTICAL 19.
Write a C++ program in which a class uses both public and private access specifiers.
PRACTICAL 20.
Write a C++ program to implement the concept of multiple inheritance in object oriented
programming.
PRACTICAL 21.
Write a C++ program to read and print employee information using multiple inheritance.