0% found this document useful (0 votes)
45 views23 pages

Project On C++

The document contains 21 questions asking to write programs to demonstrate different C++ concepts like scope resolution operator, call by value vs call by reference, inline functions, function overloading, Fibonacci series using for loops, factorials using while loops, Armstrong numbers using do-while loops, switch statements, goto statements, if statements, checking palindrome numbers and strings, classes for student details, constructors and destructors, multilevel inheritance, multiple inheritance, hierarchical inheritance, hybrid inheritance, single inheritance, friend functions, virtual functions, and polymorphism. For each question, it provides the concept name and asks for input and output but does not give any actual code.

Uploaded by

rishabh kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views23 pages

Project On C++

The document contains 21 questions asking to write programs to demonstrate different C++ concepts like scope resolution operator, call by value vs call by reference, inline functions, function overloading, Fibonacci series using for loops, factorials using while loops, Armstrong numbers using do-while loops, switch statements, goto statements, if statements, checking palindrome numbers and strings, classes for student details, constructors and destructors, multilevel inheritance, multiple inheritance, hierarchical inheritance, hybrid inheritance, single inheritance, friend functions, virtual functions, and polymorphism. For each question, it provides the concept name and asks for input and output but does not give any actual code.

Uploaded by

rishabh kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Q1) write a program (WAP) to demonstrate use of scope resolution operator (SRO), use global variable

in local scope.

SCOPE RESOLUTION OPERATOR:

INPUT:

OUTPUT:
Q2) write a program to use call by value and call by reference.

CALL BY VALUE:

INPUT:

OUTPUT:
CALL BY REFERENCE:

INPUT:

OUTPUT:
Q3) write a program to demonstrate inline function.

LINE FUNCTION:

INPUT:

OUTPUT:
Q4) write a program to demonstrate function overloading.

FUNCTION OVERLOADING:

INPUT:
OUTPUT:

Q5) write a program to implement fibonassi series using for loop.

FIBONACCI SERIES:

INPUT:
OUTPUT:

Q6) Factorial of a no. using while loop

FACTORIAL OF NUMBER:

INPUT:

OUTPUT:
Q7) Armstrong no. Using do-while loop.

ARMSTRONG NUMBER:
INPUT:

OUTPUT:
Q8) Write a program to demonstrate switch statement.

SWITCH STATEMENT:
INPUT:

OUTPUT:
Q9) Write a program to demonstrate goto statement.

GO TO STATEMENT:
INPUT:

OUTPUT:
Q10) Write a program to demonstrate all forms of ‘if’ statement.

IF STATEMENT:
INPUT:

OUTPUT:
Q11)Write a program to demonstrate Pollidrome number string.

POLLIDROME NUMBER:

INPUT:

OUTPUT:
Q12) Write a program to demonstrate a class for student to get and print details of a student.

DETAILS OF A STUDENT

Input

OUTPUT
Q13) Write a program to demonstrate constructor and destructor.

CONSTRUCTOR AND DESTRUCTOR:


INPUT:

OUTPUT:
Q14) Write a program to demonstrate multilevel inheritance.

MULTILEVEL INHERITANCE:
INPUT:
OUTPUT:
Q15) Write a program to demonstrate multiple inheritance.

MULTIPLE INHERITENCEL:
INPUT:

OUTPUT:
Q16) Write a program to demonstrate hierarchical inheritance

HEIRARCHICAL INHERITANCE:
INPUT:

OUTPUT:
Q17) Write a program to demonstrate hybrid inheritance.

HYBRID INHERITANCE:
INPUT:

OUTPUT:
Q18) Write a program to demonstrate single inheritance.

SINGLE INHERITANCE:

INPUT:

OUTPUT:
Q19) Write a program to demonstrate friend function.

FRIEND FUNCTION:
INPUT:

OUTPUT:
Q20) Write a program to demonstrate virtual function.

VIRTUAL FUNCTION:
INPUT

OUTPUT:
Q21) Write a program to demonstrate polymorphism.

POLYMORPHISM:
INPUT:

Output

You might also like