0% found this document useful (0 votes)
3 views1 page

CPP Assignment Questions

The document outlines a series of C++ assignment questions covering basic concepts, arrays, strings, and object-oriented programming. It includes tasks such as writing programs for prime checking, string reversal, and demonstrating OOP principles like inheritance and polymorphism. Each section focuses on essential programming skills and concepts relevant to C++.

Uploaded by

Akash Sharma
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)
3 views1 page

CPP Assignment Questions

The document outlines a series of C++ assignment questions covering basic concepts, arrays, strings, and object-oriented programming. It includes tasks such as writing programs for prime checking, string reversal, and demonstrating OOP principles like inheritance and polymorphism. Each section focuses on essential programming skills and concepts relevant to C++.

Uploaded by

Akash Sharma
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

C++ Assignment Questions

1. Basic Concepts and Syntax

 Explain the differences between C++ and Java.

 Write a program to check if a given number is prime.

 Write a program to reverse a string.

 Find the factorial of a number using both recursion and iteration.

 Write a program to check if a string is a palindrome.

2. Arrays and Strings

 Write a program to find the maximum and minimum elements in an array.

 Sort an array without using built-in functions.

 Find the second largest element in an array.

 Check if two strings are anagrams of each other.

 Write a program to reverse the words in a sentence.

3. Object-Oriented Programming (OOP)

 Explain the four pillars of OOP in C++.

 Demonstrate the use of constructors and destructors.

 Write a program to illustrate inheritance and polymorphism.

 Implement function overloading and overriding.

 Explain virtual functions and create an example with runtime polymorphism.

You might also like