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

Arish Practical

Uploaded by

arish ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Arish Practical

Uploaded by

arish ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

1

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:-

Date:-___________ Teacher’s signature:-_________________


3

Practical No. 2
Objective:- Write a program using nested if statement.

Code:-

Result:-

Date:-_____________ Teacher’s signature:-_____________


4

Practical No. 3
Objective:- Write a program using switch statement.

Code:-

Result:-

Date:-_______________ Teacher’s signature:-__________________


5

Practical No. 4
Objective:- Write a C++ program that uses for loop.

Code:-

Result:-

Date:-_____________ Teacher’s signature:-__________


6

Practical No. 5
Objective:- Write a C++ program that uses while loop.

Code: - Result:-

Date:-____________ Teachers signature:-____________


7

Practical No. 6
Objective:- Write a C++ program that uses do while loop

Code:-

Result:-

Date:-_____________ Teachers signature:-_____________


8

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:-

Date:-______________ Teacher’s signature:-____________


9

Practical No. 8
Objective:- Write a C++ program for adding/ subtracting/ multiplying two integer matrices of the order up to 4x4.

Code:-

Result:-

Date:-___________ Teachers signature:-___________


10

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:-

Date:-_____________ Teachers signature:-_______________


11

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:-

Date:-________________ Teacher’s signature:-_________________


12

Practical No. 11
Objective:- Write a program involving user defined function to calculate area of circle, triangle and parallelogram.

Code:-

Result:-

Date:-____________ Teachers signature:-_______________


13

Practical No. 12
Objective:- : Write a program involving use of user defined function to calculate volume of cylinder, sphere and cube.

Code:-

Result:-

Date:-___________ Teacher’s signature:-___________


14

Practical No. 13
Objective:- Write a program involving user defined function to calculate factorial of a given number

Code:-

Result:-

Date:-___________ Teacher’s signature:-___________


15

Practical No. 14
Objective:- Write a program involving user defined function to calculate average of numbers.

Code:-

Result:-

Date:___________ Teachers signature:______________


16

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:-

Date:-____________ Teacher’s signature:-_____________


17

Practical No. 16
Objective:- Write a C++ program that uses pointer variable.

Code:-

Result:-

Date: _________________ Teacher Signature: _______________


18

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:-

Date:-______________ Teacher’s signature:-__________________


19

Practical no. 18
Objective:- Write a C++ program in which a class uses both public and private access specifiers

Code:-

Result:-

Date:___________ Teachers signature:________________


20

You might also like