[Link].
1
Write a C++ program to input basic salary of an employee and calculate its Gross
salary according to following:
Basic Salary <25000 HRA = 20%, DA = 80%
Basic Salary >= 25000 HRA = 25%, DA = 90%
Basic Salary >= 40000 HRA = 30%, DA = 95%
(OR)
Write a C++ program to print boundary elements of a matrix
[Link].2
Write a C++ program to check percentage of a student and display the division
(distinction, first, second, third or fail) scored using switch case
Percentage Division
>=80 Distinction
>=60 and <80 First division
>=50 and <60 Second Division
>=40 and <50 Third Division
<40 Fail (OR)
Create a C++ program to create a class employee containg the following members in
public.
Public members
eno integer
name 20 characters
des 20 characters
member Function
void get() to accept values for all data members
Declare the derived class called Salary which contain the following details.
Public members
bp, hra, da, pf, np float
member Function
void get1() to accept values for bp,hra,da and pf and invoke calculate()
calculate() calculate the np by adding bp,hra,da subtracting pf
display() Display all the details
Create the derived class object and read the number of [Link] the function
get(), get1() for each employee and display the details
[Link].3
Write a C++ program to enter any number and check whether the number is
palindrome or not using while loop.
(OR)
Define a class named Publisher in C++ with the following descriptions
private members
Bookno integer
Title 20 characters
Author 10 characters
price float
Totamt float
Define a member function called calculate() to calculate the number of copies and the
price and return the total amount.
Public members
• A default constructor function to initialize all data members. The book number must
be automatically generated staring from 1001
• Readdata() function to accept values for Title,Author and price. Get the number of
copies from the user and invoke calculate().
• Display data () function display all the data members in the following format
ABC PUBLISHERS
~~~~~~~~~
INVOICE
~~~~~~~~~
==================================
Book Number :
Title :
Author Name :
Price Per Book :
Total Amount :
==================================
[Link].4
Using do while loop create the following menu based C++ program
[Link] a Decimal to binary number
[Link] a binary number to Decimal
3. Exit
Depending on the choice accept the value and display the result .The
program should continue till the user select the third option.
(OR)
Write a menu driven C++ program to Insert and Delete elements in a single
dimension array of integers and print the array after insertion or deletion.
[Link].5
Write a C++ program using a user defined function to generate the Fibonacci series
till n terms and print if each term is prime or Composite. (OR)
Write a C++ program to create a class called Student with the following details
Protected member
Rno integer
Public members
void Readno(int); to accept roll number and assign to Rno
void Writeno(); To display Rno.
The class Test is derived Publically from the Student class contains the following
details
Protected member
Mark1 float
Mark2 float
Public members
void Readmark(float,float); To accept mark1 and mark2
void Writemark(); To display the marks
Create a class called Sports with the following detail
Protected members
score integer
Public members
void Readscore(int); To accept the score
void Writescore(); To display the score
The class Result is derived Publically from Test and Sports class contains the following
details
Private member
Total float
Public member
void display() assign the sum of mark1 ,mark2,score in total.
Invoke Writeno(), Writemark() and Writescore() .Display the total also.
[Link].1
(OR)
[Link].2
(OR)
[Link].3
(OR)
[Link].4
(OR)
[Link].5
(OR)