C++ Programming

EXERCISE – 1
A) Write a simple program on printing "Hello World".
B) Write a simple program on printing "Hello Name" where name is the input from the user.
C) Convert any two programs that are written in C into C++.
D) Write a description of using g++.
EXERCISE – 2
A) Write a program that computes the simple interest and compound interest payable on principal amount(in Rs.) of loan borrowed by the customer from a bank for a given periodof time (in years) at specific rate of interest. Further determine whether the bank will benefit by charging simple interest or compound interest.
B) Write a program to calculate the fare for the passengers traveling in a bus. When a passenger enters the bus, the conductor asks "What distance will you travel?" On knowing distance from passenger (as an approximate integer), the conductor mentions the fare to the passenger.
EXERCISE – 3
A) Write a program to implement call by value and call by reference using reference variable.
B) Write a program to illustrate scope resolution, new and delete Operators.
C) Write a program to illustrate Storage classes.
D) Write a program to illustrate Enumerations.
EXERCISE – 4
A) Write a program illustrate function overloading.
B) Write a program illustrate the use of default arguments for simple interest function.
EXERCISE – 5
A) Write a program to illustrate function overloading. Write 2 overloading functions for adding two numbers.
B) Write a program illustrate function template for power of a number.
C) Write a program to illustrate function template for swapping of two numbers.
EXERCISE – 6
A) 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.
B) Write a C++ program demonstrating a BankAccount with necessary methods and variables.
EXERCISE – 7
A) Write a program implementing Friend function.
B) Write a program to illustrate this pointer.
C) Write a program to illustrate pointer to a class.
EXERCISE – 8
A) Write a c ++ program to implement the overloading unary operator.
B) Write a c ++ program to implement the overloading binary operator.
C) Write a c ++ program to implement the overloading assignment = operator.
EXERCISE – 9
A) Write a program to illustrate single inheritance.
B) Write a program to illustrate hierarchical inheritance.
C) Write a program to illustrate multiple inheritance.
D) Write a program to illustrate multilevel inheritance.
E) Write a program to illustrate hybrid inheritance.
F) Write a program to show Virtual Base Class.
EXERCISE – 10
A) Write a Program in C++ to illustrate the order of execution of constructors and destructors in inheritance.
EXERCISE – 11
A) Write a program to illustrate run time polymorphism.
B) Write a program illustrates pure virtual function and calculate the area of different shapes by using abstract class.
EXERCISE – 12
A) Write a C++ program to illustrate template class.
B) Write a program to illustrate class templates with multiple parameters.
C) Write a program to illustrate member function templates.
EXERCISE – 13
A) Write a program for exception handling divide by zero.
B) Write a program to rethrow an Exception.
EXERCISE – 14
A) Write a program to implement list and list operations
B) Write a program to implement vector and vector operations.
EXERCISE – 15
A) Write a program to implement deque and deque operations.
B) Write a program to implement map and map operations.

No comments:

Post a Comment

Total Pageviews