BCA-302-C++ Tutorial
BCA-302-C++ Tutorial
1. What do you think are the major issues facing the software industry today?
2. Discuss an approach to the development of procedure-oriented programs.
3. Describe inheritance as applied to OOP.
4. Write a program to display the following output using a single cout statement.
Maths = 90
Physics = 77
Chemistry = 69
5. What are the applications of void data type in C++?
6. Write a program to print the following output using for loops.
1
22
333
4444
55555
……….
Tutorial - 2 Unit-1
1. The size of a char array that is declared to store a string should be one larger than the
number of characters in the string. Why?
2. What do you mean by dynamic initialization of a variable? Give an example.
3. What is the application of the scope resolution operator :: in C++?
4. Write a program to evaluate the following investment equation
V = P(1 + r)n
And print the tables which would give the value of V for various combinations of the
following values of P, r and n;
P: 1000, 2000, 3000,..... ,10,000
r: 0.10, 0.11, 0.12,.....,0.20
n: 1,2,3,......, 10
Hint: P is the principal amount and V is the value of money at the end of n years. This
equations can be recursively written as
1. What is the most significant advantage that you can see in using references instead of
pointers?
2. How does an inline function differ from a preprocessor macro?
3. What do we mean by overloading of a fucations? Explain with an example when do we
use this concept?
4. How do we achieve function overloading? On what basis, the compiler distinguishes
between a set of overloaded functions having the same name?
5. Write a funcation to read a matrix of size m x n from the keyboard.
6. Write a program to compute the area of a triangle and a circle by overloading the area()
funcation.
Tutorial-4 Unit-2
Tutorial-6 Unit-3
Tutorial-8 Unit-4
Tutorial-9 Unit-5
1. What are the different forms of inheritance? Give examples for each
2. Describe the syntax of the single inheritance in C++.
3. Explain the Console input output Operations, Methods in C++.
4. What is the difference between inheritance and polymorphism?
5. What is polymorphism?
Tutorial-10 Unit-5