July 16, 2021 in C and CPP
The minimum value of char type variable is
1.1 The minimum value of char type variable is
A) ‘\u0020’
B) ‘\u00ff’
C) ‘ ’
D) ‘\u0000’
July 16, 2021 in C and CPP
1.1 The minimum value of char type variable is
A) ‘\u0020’
B) ‘\u00ff’
C) ‘ ’
D) ‘\u0000’
July 16, 2021 in C and CPP
c) What is a pointer? How it can be used with objects of a class? Explain this pointer.
July 16, 2021 in C and CPP
b) Explain exception and its types. How are exceptions handled in C++?
July 16, 2021 in C and CPP
a) Explain generic programming and working of templates.
July 16, 2021 in C and CPP
b) Create two classes DistMeter and DistFeet, which stores the values of distances. DistMeter stores in meter and cm and DistFeet in feet and inches. Write a program that read values for objects of both the classes and add object of DistMeter and DistFeet using friend function. A function should return equivalent meter in float. Also write main() function for illustration of the usage of the two classes DistMeter and DistFeet.
July 16, 2021 in C and CPP
a) Two classes Degree and Radian are given. Both classes have deg and rad data members in
float respectively. Define classes such that they support the statement:
Rad_obj = Deg_obj;
Write a complete program which convert object of Degree to object of Radian. Define
conversion function in source class. (1 radian = degree × / 180)
July 16, 2021 in C and CPP
b) A class Distance has two data members: feet in integer and inch in float. Overload
>> operator to input data and << operator to display distance in 10’-3.5” format. (12 inch=1 foot)
July 16, 2021 in C and CPP
a) A class Student has rollno, branch; Inter_exam has sub1mark, sub2mark; Ext_exam has
sub1mark, sub2mark and Result has Total as data members. Write necessary member
functions to input and print data. Calculate internal exam and external exam subtotals using their respective member functions. Result has a function to calculate Total=internal + external subtotals. Write a complete program to implement the hierarchy of the classes using virtual base class.

July 16, 2021 in C and CPP
b) What are the characteristics of a constructor? A class Time has data members: hour and
minute in integer. Only define a class having data members int a and float b, with default,
parameterized and copy constructor.
July 16, 2021 in C and CPP
a) Write a complete C++ program with the following information.
Define a class having data member string of 20 characters. Define default constructor,
getdata() and print() functions. Define the following member functions without using string.h file:
i) A member function receives an object of the class as an argument and compares it
with the invoking object. If the strings are not equal it returns 0 else 1.
ii) A member function returns the string length of invoking object.
iii) A member function checks whether the data member of invoking object is palindrome
or not. If the string is palindrome, it returns 1 else 0. (Palindrome means reverse of the
string is same as the original one.)