Sie sind auf Seite 1von 4

Institute Of Science & Technology

For Advanced Studies & Research


DEPARTMENT OF M.SC.(INFORMATION TECHNOLOGY)
ACADEMIC YEAR:2019-20(ODD) SEMESTER: I
SUBJECT:PS01CINT26-Practical (Advanced Programming Concepts and

Data Structures)
PRACTICAL LIST

Sr. No. Name of Experiment

1. Write a program to print your name without using semicolon


2. Write a program to check whether a number is Armstrong or not.
3. To write a C++ program to find the sum & reverse of digits and Check is
Palindrome or not.( using function)
4. Write a program to find the area and circumference of the circle.
Formula: Area =3.14*r*r Circum = 2*3.14*r
5. Write a program to check whether the entered year is leap year or not (a year is
leap if it is divisible by 4 and divisible by 100 or 400.)
6. Write a program to calculate simple interest.
7. Write a C++ program to print the Fibonacci series 0 1 1 2 3 5 8 13 …. By getting
number of number to be displayed is given as input Eg. 5 is input value means it
should print first 5 numbers 0 1 1 2 3
8. Write a program to find the factorial of a number. (using recursion)
9. An electricity board charges the following rates to domestic users to discourage
large consumption of energy:
For the first 100 units: 60P per unit
For next 200 units : 80P per unit
Beyond 300 units : 90P per unit
10. A company has following scheme for payment to their staff.
Net salary = Gross salary – Deduction . Gross salary = Basic + DA + HRA +
Medical.
Deduction = Insurance + PF. Where DA(Dearness Allounce) = 40% of basic ,
HRA (house rent Allounce) = 15% of basic , medical = 5% of basic ,
PF(provident fund) = 7% of gross , Insurance =10% of gross.Write a program to
calculate net payment to any employee.

11. Write a C++ program to swap two number by both call by value and call by
reference mechanism, using two functions swap_value() and swap_reference
respectively , by getting the choice from the user and executing the user’s choice
by switch-case.
12. Write a program to read four numbers from keyboard and find out maximum out
of these four (using inline function).
13. Write a program to read three numbers from keyboard and find out maximum
out of these ternary.(using ternary operator)

Dr. Niky K. Jain Page 1


14. Write a program to read marks from keyboard and your program should display
equivalent grade according to following table.(if-else if ladder)
Marks Grade
100-80 Honours
60-79 First class
40-59 Second class
0-39 fail
15. Write a program that reads a number from 1 to 7 and accordingly it should
display Monday to Sunday(switch-case).
16. Write a program to check whether input alphabet is a vowel or not.
17. Write a C++ program to perform five arithmetic operations such as addition,
subtraction, division, modulus and multiplication using function and switch-case
statement. When it finishes the calculation, the program should ask if the user
wants to do another calculation. The response can be Y or N.
18. Write a program to palindrome of number.
19. Write a program for addition of two matrices.
20. Print the below patterns
* 12345 ******* ABCDEFGH
*** 1234 *** *** ABCDEFG
***** 123 ** ** ABCDEF
******* 12 * * ABCDE
********* 1 ABCD
ABC
AB
A
21. Write a C++ program to use scope resolution operator. Display the various values of
the same variables declared at different scope levels
22. Write a program to design a class having static member function named
showcount() which has the property of displaying the number of objects created
of the class.
23. To write a c ++ program to implement the function overloading
24. To write a c ++ program to implement the default argument
25. Introduction of Classes

a) Write a program using class to process shopping List for a Departmental


store. The list include details such as the Code No and price of each item
and perform the operations like Adding, Deleting Items to the list and
printing the total value of an order.
b) Design a simple class with all arithmetic function. Use them in MAIN
function.
c) Create a class named Student having data member name, rollno and three
marks. Write a member function to
(1) Input name, rollno and marks
(2) Calculate percentage
(3) Display all the information
d) Declare a class cricketer including following member.
Data member: 1. Name 2. Age 3. For which country he plays 4. Type of
cricketer (batsman/ bowler) 5. Total matches he has played
Member function:
1. To assign initial values
2. To enter data
3. To display his data
Write a main program for 5 cricketer.

Dr. Niky K. Jain Page 2


e) Write a program to multiply two matrices A and B by using class.(Size of
matrices are 4 * 4)
f) Write a program which creates & uses array of object of a class (for eg.
Implementing the list of managers of a company having details such as
Name , Age etc.)
26. Multiple Class, Constructor/Destructor
a) Design classes named Triangle, Square, and Circle. Make the different
function in each class to find areas of particular shape.
b) Define a class to represent a bank account. Include the members like
name of the depositor, account number, type of account, and balance
amount in the account. Make functions (1) To assign initial values, (2) To
deposit an amount, (3) To withdraw an amount after checking the
balance, (4) To display name and balance. Write a main program to test the
program.
c) Create a 'DISTANCE' class with : - feet and inches as data members -
member function to input distance - member function to output distance
- member function to add two distance objects Write a main function to
create objects of DISTANCE class. Input two distances and output the
sum.
d) Write a program to design a student class representing student roll. No.
and a test class(derived class of student) representing the scores of the
student in various subjects and sports class representing the score in
sports. The sports and test class should be inherited by a result class
having the functionality to add the scores and display the final result for a
student.
e) Create a class called 'EMPLOYEE' that has - EMPCODE and EMPNAME as
data members - member function getdata( ) to input data - member
function display( ) to output data Write a main function to create EMP, an
array of EMPLOYEE objects. Accept and display the details of at least 6
employees.
27. Friend function and function overloading
a) Write a program to overload squareroot() function which finds square
root of integer, long and double numbers.
b) Create two classes DM and DB which store the value of distances. DM
stores distances in meter and centimeters and DB in feet and inches.
Write a program that read values of the class objects and add one object of
DM with another object of DB.
c) Write a program to add two complex numbers using friend function
28. Operator Overloading
a) Write a program to perform operations like addition, multiplication and
subtraction using operator overloading.
29. Inheritance – I
a) Design a class called Vehicle having a unique vehicle-number. Derive a
class called Car having members as no. of seats and max. speed limit (in
kms/hr.). Derive second class called Truck having members as the capacity
of load (in tons) and max. speed limit (kms/hr.).
Main should call a function, which will compare the Speed of a car and a truck
and print the speedier one. Main should also print the vehicle no. of all the vehicles
Whose speed limit is more than 150 kms/hr.
b) Create a class student whose members are name, college name. Create two
derived classes for IT students and commerce students. Develop a virtual

Dr. Niky K. Jain Page 3


function that finds whether a particular student passed with distinctions or
not. IT students get distinction if they secure marks 66% or above, for
commerce student it is 70% or above. Display the name of students
graduating with distinction.
30. Inheritance – II
a) Declare a class called bird having data members as name and color.
Derive two classes called flying and non-flying has data member
speed_to_walk. Declare a pure virtual function get_speed and display in
base class bird. Override these two in the derived classes for getting
speed and displaying all data members of the class.
b) Declare a class Person having name as member. Derive two classes
1. Businessman having income and number of people involved in his
business as members.
2. Employee having income as a member.
3. Main should call a function that compares the incomes of the above two
categories and print the larger one. Main should also find businessman
having more than 10 people involved in their business.
31. Virtual Function and Polymorphism
a) Design a class media having data member’s title and publication. Derive a
class book having a member to store number of pages in the book. Derive
another class cd having a member to store the playing time. Define functions to
read and display the data in the base class. Over-ride the same in both of the
derived classes.
32. Create a class called 'TIME' that has three integer data members for hours,
minutes and seconds constructor to initialize the object to zero constructor to
initialize the object to some constant value member function to add two TIME
objects member function to display time in HH:MM:SS format Write a main
function to create two TIME objects, add them and display the result in
HH:MM:SS format.
33. Data Structure
a) Write a C++ program to implement basic stack operations using array.
b) Write a C++ program to implement basic Queue operations using array.
c) Write a C++ program To implement basic Linked List operations
using array.

Dr. Niky K. Jain Page 4

Das könnte Ihnen auch gefallen