Q1(a) Write a C++ program to display the table of a given number. Use appropriate formatting to display the table.
Q1(b) Write C++ program to demonstrate use of followings:
(i) ::
(ii) ?:
(iii) sizeof( )
Q1 (c) Write a C++ program to create class named Book. Define appropriate constructors ( using concept of overloading) to create differ objects. Define methods for displaying book details including book’s author name, publisher, price of book. Make necessary assumptions wherever required.
Q2(a) Write C++ program for concatenation of two strings using ‘+’ operator overloading. Make necessary assumptions wherever required.
Q2(b) Write a C++ program to demonstrate exception handling. This program takes marks of ten students in a subject as input and store it in an array. Make provisions so that if marks entered as input is less than 0 or greater than 100 then message “Invalid Input” is displayed and program terminate normally.
Reviews
There are no reviews yet.