C++ Syllabus
UNIT I
Introduction of C++
Introduction of OOPS – Abstraction, Inheritance, Encapsulation, polymorphism
Basics Syntax
Comments
Data Types – Integer, Character, Float, Double etc with Type Modifier’s unsigned, short, long etc
Variables
Input/Output
All Operators – Arithmetic, Logical, Relational, Assignment, Bitwise
Constants
UNIT II
Control Statements – if, else, else if, nested if else, switch, break, continue, for loop, while loop, do,
while loop, nested loops
Preprocessor & Namespace
Arrays – 1d and multi
Memory Allocation – new & delete
String – inbuilt and char string with inbuilt functions
Pointer & Reference
Functions – functions types, call by value & reference, function overloading & default arguments
Structure
Typedef
UNIT III
Class & Object – Constructor, Destructor, access modifiers (public, private), Member function, Scope
Resolution Operator, Friend Function
Template & Keywords
STL – Algorithms, Iterator, Container’s (vector, stack, queue, dequeue, set, multiset, map, multimap,
priority queue, list and Hashing (unordered))
Lambda function
QUESTIONS AND BASIC ALGORITHMS
UNIT I
1. Write a program to take two integer inputs from the user and perform arithmetic operations
(addition, subtraction, multiplication, division) on them. Display the results.
2. Swap
3. Swap without using third variable
UNIT II
1. Find Odd even
2. Greatest in three numbers
3. Average of three subjects
4. 1 to 10 numbers
5. Reverse printing like 10 to 1
6. Print odd even
7. Prime numbers
8. Armstrong number
9. Factorial
10. Fibonacci series
11. Separating digits
12. Sum of all digits
13. Reverse of number
14. Perfect number
15. Palindrome number
16. Print & input the array elements – normal, reverse
17. Matrix – addition, subtraction, multiplication
18. Palindrome string
19. Print substring
20. Add two strings
21. Write functions for above programs
22. Create a structure named Student with members for name, roll number, marks in three
subjects. Write a program that takes input for multiple students' records and displays the
average marks for each student.
UNIT III
1. Create a class named Student with private members name, roll number, and marks. Implement
constructor and destructor functions. Write a program to create objects of the class and
demonstrate their usage.
2. Write a template function that takes two arguments of any data type and returns the maximum
value among them.
3. Parenthesis matching
4. Expression conversion – infix to prefix, infix to postfix
5. Use the vector container to store a list of integers. Write a program to find the sum, average,
and maximum element using STL algorithms.
6. Implement a queue data structure using the queue container. Perform enqueue and dequeue
operations and display the contents of the queue.
7. Implement a program that uses a map container to store names and phone numbers. Allow
users to search for a name and retrieve its corresponding phone number.
8. Write a program that uses the STL sorting algorithm to sort an array of integers in descending
order.
RESOURCES
Online YouTube Tutorial :-
CodeWithHarry
Apna College
Love Babbar
WebSites :-
GeekForGeeks
Scaler Topics
CodeWithHarry
Coding Practice :-
HackerRank ( Best as you are starting )
HackerEarth
GeekForGeeks
LeetCode