s4 Btech Comp Progr C
s4 Btech Comp Progr C
MODULE – I
1. a) Write a program to input an expression of the form a # b and evaluate it. The symbol
‘#’ is any one of the arithmetic operator. (10 Mark)
b) Explain the types of operators in C++. (10 Mark)
OR
a) Write a program to generate the electricity bill of a consumer as per the given
conditions. If consumption is below 100, unit charge is Rs. 3/-; if consumption is
below 200, the unit charge is Rs. 7/-; if consumption is greater than 200 and less than
300, the unit charge is Rs. 15/- and if consumption is more than 300 unit, print the
comment as ‘MEET A.Ex.E AT THE OFFICE’. (10 Mark)
b) Discuss the applications of unary operators with examples. (10 Mark)
MODULE – II
2. a) Develop a program to in put the data of ‘n’ students such as name, register number and
three marks and then obtain the total mark of each student. Also apply the concept of
initialization of structure. (10 Mark)
b) What are recursive functions? Develop a program to generate a Fibonacci series.
(10 Mark)
OR
a) Write a note on the template function. Develop program codes to sort a list of
numbers in alphabetical order. (10 Mark)
b) Explain about pointers. Construct a C++ program to exchange two values using
pointers. (10 Mark)
MODULE – III
3. Discuss about multiple inheritance. Write an object oriented program to apply the
concept of multiple inheritance. (20 Mark)
OR
Explain the concept of files in C++. Write a program to read a passage from the file
OR
Develop a C++ program to represent the concept of stack and queues (20 Mark)