Arish Practical
Arish Practical
Practical No. 1
Objective:- Write a program for each if, if-else and else-if.
A) If-statement
Code:-
Result:-
B) If-else statement
Code:- Result:-
2
C) else-if statement
Code:-
Result:-
Practical No. 2
Objective:- Write a program using nested if statement.
Code:-
Result:-
Practical No. 3
Objective:- Write a program using switch statement.
Code:-
Result:-
Practical No. 4
Objective:- Write a C++ program that uses for loop.
Code:-
Result:-
Practical No. 5
Objective:- Write a C++ program that uses while loop.
Code: - Result:-
Practical No. 6
Objective:- Write a C++ program that uses do while loop
Code:-
Result:-
Practical No. 7
Objective:- Write a C++ program which stores numeric values in a one dimensional array using for loop
and finds the highest, lowest and average values.
Code:-
Result:-
Practical No. 8
Objective:- Write a C++ program for adding/ subtracting/ multiplying two integer matrices of the order up to 4x4.
Code:-
Result:-
Practical No. 9
Objective:- Write C++ program to perform various operations on string using string functions , i.e. strcpy,
strcat, strlen and strcmp.
Code:-
Result:-
Practical No. 10
Objective:- Write a program to perform user defined function to perform basic arithmetic operations i.e. add,
subtract, multiply and divide.
Code:-
Result:-
Practical No. 11
Objective:- Write a program involving user defined function to calculate area of circle, triangle and parallelogram.
Code:-
Result:-
Practical No. 12
Objective:- : Write a program involving use of user defined function to calculate volume of cylinder, sphere and cube.
Code:-
Result:-
Practical No. 13
Objective:- Write a program involving user defined function to calculate factorial of a given number
Code:-
Result:-
Practical No. 14
Objective:- Write a program involving user defined function to calculate average of numbers.
Code:-
Result:-
Practical No. 15
Objective:- : Write a simple program using & to return memory address of a variable and storing it in a pointer variable.
Code:-
Result:-
Practical No. 16
Objective:- Write a C++ program that uses pointer variable.
Code:-
Result:-
Practical No. 17
Objective:- Write a C++ program to declare a class along with data members and member functions in its body
and create the objects of class in the main( ) function and call member functions of class with the help of objects.
Code:-
Result:-
Practical no. 18
Objective:- Write a C++ program in which a class uses both public and private access specifiers
Code:-
Result:-