0% found this document useful (0 votes)
1 views

22 CS101 Problem Solving Using C++ Lab Manual

Uploaded by

arisurekha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

22 CS101 Problem Solving Using C++ Lab Manual

Uploaded by

arisurekha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

R.M.K.

ENGINEERING COLLEGE
(An Autonomous Institution)
R.S.M Nagar, Kavaraipettai, Gummidipoondi Taluk, Thiruvallur District - 601 206.

(Affiliated to Anna University, Chennai / Approved by AICTE, New Delhi /


Accredited by NAAC with A+ Grade / All the eligible UG Programs are accredited by NBA, New Delhi)

DEPARTMENT OF SCIENCE AND HUMANITIES


(GENERAL ENGINEERING)
Regulation 2022

22CS101 – PROBLEM SOLVING USING C++

LABORATORY MANUAL

COMMON FOR B.E./B.TECH - FIRST YEAR


R.M.K. ENGINEERING COLLEGE
(An Autonomous Institution)
R.S.M Nagar, Kavaraipettai, Gummidipoondi Taluk, Thiruvallur District - 601 206.

(Affiliated to Anna University, Chennai / Approved by AICTE, New Delhi /


Accredited by NAAC with A+ Grade / All the eligible UG Programs are accredited by NBA, New Delhi)

DEPARTMENT OF SCIENCE AND HUMANITIES


(GENERAL ENGINEERING)
Regulation 2022
22CS101 – PROBLEM SOLVING USING C++
LABORATORY MANUAL

COMMON FOR B.E./B.TECH - FIRST YEAR

Name : --------------------------------------------------

Register Number : --------------------------------------------------

Branch / Section : --------------------------------------------------

Academic Year / Semester : --------------------------------------------------

Prepared by Verified by Approved by Approved by

Name Mr. S Vijayakumar Dr. S Radhika Dr. S Pavai Madheswari Dr. K A Mohamed Junaid

Associate Professor Professor and Academic Coordinator


Designation Principal
CSE Division Head (GE) & HoD / S&H

Signature

Date
PROGRAM OUTCOMES (POs)

Engineering Graduates will be able to:

1. Engineering Knowledge: Apply the knowledge of Mathematics, Science, Engineering


Fundamentals, and an Engineering Specialization to the solution of complex engineering
problems.
2. Problem Analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of Mathematics,
Natural Sciences, and Engineering Sciences.
3. Design/development of solutions: Design solutions for complex engineering problems and
design system components or processes that meet the specified needs with appropriate
consideration for the public health and safety, and the cultural, societal, and environmental
considerations.
4. Conduct investigations of complex problems: Use research-based knowledge and research
methods including design of experiments, analysis and interpretation of data, and synthesis of
the information to provide valid conclusions.
5. Modern Tool Usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modelling to complex engineering activities
with an understanding of the limitations.
6. The Engineer and Society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to
the professional engineering practice.
7. Environment and Sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and need
for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
9. Individual and Team Work: Function effectively as an individual, and as a member or leader
in diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend and write
effective reports and design documentation, make effective presentations, and give and receive
clear instructions.
11. Project Management and Finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member and
leader in a team, to manage projects and in multidisciplinary environments.
12. Life-long Learning: Recognize the need for and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change.
22CS101 – Problem Solving Using C++ 4

Syllabus

PROBLEM SOLVING USING C++ L T P C


22CS101
(Theory Course with Laboratory Component) 3 0 2 4
OBJECTIVES:
 To learn programming fundamentals in C.
 To gain knowledge on pointers and functions.
 To apply the principles of classes and objects
 To develop a C++ application with object oriented concepts.
 To use the functionalities of I/O operations, files build C++ programs using exceptions.
UNIT I PROGRAMMING FUNDAMENTALS 15
Computational thinking for Problem solving – Algorithmic thinking for problem Solving-
Building Blocks - Problem Solving and Decomposition –Dealing with Error – Evaluation.
Overview of C – Data types – Identifiers – Variables – Storage Class Specifiers – Constants –
Operators - Expressions – Statements – Arrays and Strings – Single-Dimensional – Two-
Dimensional Arrays – Arrays of Strings – Multidimensional Arrays.
UNIT II POINTERS AND FUNCTIONS 15

Pointers -Variables – Operators – Expressions – Pointers and Arrays – Functions - Scope Rules –
Function Arguments – return Statement – Recursion – Structures – Unions – Enumerations.

UNIT III CLASSES AND OBJECTS 15


Concepts of Object Oriented Programming – Benefits of OOP – Simple C++ program - Classes
and Objects - Member functions - Nesting of member functions - Private member functions -
Memory Allocation for Objects - Static Data Members - Static Member functions - Array of
Objects - Objects as function arguments - Returning objects - friend functions – Const Member
functions - Constructors – Destructors
OPERATOR OVERLOADING , INHERITANCE AND
UNIT IV 15
POLYMORPHISM
Operator Overloading - Overloading Using Friend functions – Inheritance – Types of inheritance
– Virtual Base Class - Abstract Class – Constructors in Derived Classes - member class: nesting
of classes. Pointer to objects – this pointer- Pointer to derived Class - Virtual functions – Pure
Virtual Functions – Polymorphism
UNIT V I/O, FILES AND EXCEPTIONS 15
C++ Streams – Unformatted I/O - Formatted Console I/O – Opening and Closing File – File
modes - File pointers and their manipulations – Templates – Class Templates – Function
Templates - Exception handling.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 5

Lab Exercises
1. Write C/C++ programs for the following:
a. Find the sum of individual digits of a positive integer.
b. Compute the GCD of two numbers.
c. Find the roots of a number (Newton‘s method)
2. Write C/C++ programs using arrays:
a. Find the maximum of an array of numbers.
b. Remove duplicates from an array of numbers.
c. Print the numbers in an array after removing even numbers.
3. Write C/C++ programs using strings:
a. Checking for palindrome.
b. Count the occurrences of each character in a given word.
4. Generate salary slip of employees using structures and pointers. Create a structure
Employee with the following members:
EID, Ename, Designation, DOB, DOJ, Basicpay
Note that DOB and DOJ should be implemented using structure within structure.
5. Compute internal marks of students for five different subjects using structures and
functions.
6. Write a program Illustrating Class Declarations, Definition, and Accessing Class
Members.
7. Program to illustrate default constructor, parameterized constructor and copy constructors
8. Write a Program to Demonstrate the i) Operator Overloading. ii) Function Overloading.
9. Write a Program to Demonstrate Friend Function and Friend Class.
10. Program to demonstrate inline functions.
11. Program for Overriding of member functions.
12. Write C++ programs that illustrate how the following forms of inheritance are supported:
a) Single inheritance b)Multiple inheritance c)Multi level inheritance
d)Hierarchical inheritance
13. Program to demonstrate pure virtual function implementation.
14. Count the number of account holders whose balance is less than the minimum balance
using sequential access file.
15. Write a Program to Demonstrate the Catching of all Exceptions.
Mini project.

TOTAL: 45+30 = 75 PERIODS

TEXT BOOKS:
1. Herbert Schildt, “The Complete Reference C++”, 4th edition, MH, 2015. (Unit 1 & 2)
2. E Balagurusamy,”Object Oriented Programming with C++”, 4th Edition, Tata McGraw-
Hill Education, 2008. (Unit 3, 4 & 5)

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 6

REFERENCES:
1. Nell Dale, Chip Weems, “Programming and Problem Solving with C++”, 5th Edition,
Jones and Barklett Publishers, 2010.
2. John Hubbard, “Schaum's Outline of Programming with C++”, MH, 2016.
3. Yashavant P. Kanetkar, “Let us C++”, BPB Publications, 2020
4. ISRD Group, “Introduction to Object-oriented Programming and C++”, Tata McGraw-
Hill Publishing Company Ltd., 2007.
5. D. S. Malik, “C++ Programming: From Problem Analysis to Program Design”, Third
Edition, Thomson Course Technology, 2007.
6. https://infyspringboard.onwingspan.com/web/en/aptoclex_auth_01297200240671948837
_shared/overview

Course Outcomes

CO1: Solve problems using basic constructs in C.


CO2: Implement C programs using pointers and functions.
CO3: Apply object-oriented concepts and solve real world problems.
CO4: Develop C++ programs using operator overloading and polymorphism.
CO5: Implement C++ programs using Files and Exceptions.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 7

Ex. No. List of Exercises


1 Write C/C++ programs for the following:

a Find the sum of individual digits of a positive integer.

b Compute the GCD of two numbers

c Find the roots of a number (Newton‘s method)


2 Write C/C++ programs using arrays:
a Find the maximum of an array of numbers.

b Remove duplicates from an array of numbers.

c Print the numbers in an array after removing even numbers.

3 Write C/C++ programs using strings:

a Checking for palindrome.

b Count the occurrences of each character in a given word


Generate salary slip of employees using structures and pointers.
Create a structure Employee with the following members: EID, Ename, Designation, DOB,
4
DOJ, Basic pay. Note that DOB and DOJ should be implemented using structure within
structure.
5 Compute internal marks of students for five different subjects using structures and functions.

6 Write a program Illustrating Class Declarations, Definition, and Accessing Class Members.

7 Program to illustrate default constructor, parameterized constructor and copy constructors

8 Write a Program to Demonstrate the i) Operator Overloading. ii) Function Overloading

9 Write a Program to Demonstrate Friend Function and Friend Class.

10 Program to demonstrate inline functions


11 Program for Overriding of member functions.
12 Write C++ programs that illustrate how the following forms of inheritance are supported:
a Single inheritance
b Multiple inheritance
c Multi level inheritance

d Hierarchical inheritance
13 Program to demonstrate pure virtual function implementation.
Count the number of account holders whose balance is less than the minimum balance using
14
sequential access file.
15 Write a Program to Demonstrate the Catching of all Exceptions

16 Mini Project

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 8

Date :
Exercise Number :1a
Title: Find the sum of individual digits of a positive integer

Aim:
To write a for computing sum of individual digits of a positive integer program using C / C++

Problem Description:
Sum of digits in a C program allows a user to enter any number, divide that number into individual
numbers, and sum those individual numbers.
Example 1:
Given number = 14892 => 1 + 4 + 8 + 9 + 2 = 24.
Sum of digits of a given number “14892” is 24.
Example 2:
Given number = 3721 => 3 + 7 + 2 + 1 = 13.
Sum of digits of a given number “3721” is 13.
To solve this, we will follow these steps −
o num := 58612
o sum := 0
o while num is not equal to 0, do:
 sum := sum + num mod 10
 num := num / 10
o return sum

Algorithm:
1. Take the number as input.
2. Divide the number by 10 and store the remainder in a variable.
3. Add the remainder to the sum.
4. Repeat the process until the number is not 0.
5. Print/return the sum.

Sample Output:
Enter an integer number: 456
Sum of digits of given integer number 456 is 15

Enter an integer number: 654


Sum of digits of given integer number 654 is 15

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 9

Result:
Thus a program to compute sum of individual digits of a positive integer using C / C++ is
successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 10

Date :
Exercise Number :1b
Title: Compute the GCD of two numbers

Aim:
To write a program to compute GCD of two numbers using C / C++.

Problem Description:
The greatest common divisor (GCD) refers to the greatest positive integer that is a common divisor for a
given set of positive integers. It is also termed as the highest common factor (HCF) or the greatest
common factor (GCF).
Factors : Factors of a number divides the original number evenly. For example, if 8 is the factor of 64,
then 8 can divide 64 into 8 equal parts.
Common Factors : If factor of a number is a factor of another number, then it is said to be a common
factor for the two numbers. For example, 2 is a factor of 4 and 8, hence 2 is a common factor.
GCD : GCD is the greatest common factor of two or more numbers. A factor that is the highest among
the numbers.

Example:
The greatest common divisor of 12 and 26 can be calculated as:
Divisors of 12 are 1, 2, 3, 4, 6, and 12.
Divisors of 26 are 1, 2, 13, and 26.
Common divisors of 12 and 26 are 1 and 2.
Therefore the greatest common divisor of (12, 26) is 2.

Finding Greatest Common Divisor by LCM Method


As per the LCM Method for the greatest common divisor, the GCD of two positive integers (a, b) can be
calculated by using the following formula:
GCD(a, b) = (a X b) / LCM(a, b)
The steps to calculate the GCD of (a, b) using the LCM method is:
Find the product of a and b.
Find the least common multiple (LCM) of a and b.
Divide the values obtained in Step 1 and Step 2.
The obtained value after division is the greatest common divisor of (a, b).

Example:
Find the greatest common divisor of 15 and 70 using the LCM method.
Solution: The greatest common divisor of 15 and 70 can be calculated as:

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 11

The product of 15 and 70 is given as, 15 × 70


The LCM of (15, 70) is 210.
GCD (15, 20) = (15 × 70) / 210 = 5.
Therefore the greatest common divisor of (15, 70) is 5.

Algorithm:
1. Start Step
2. Declare variables num1, num2, gcd = 1, i = 1
3. Input num1 and num2
4. Repeat until i <= num1 and i <= num2
a. If num1 % i == 0 && num2 % i == 0:
b. gcd = i
5. Print gcd
6. Stop

Sample Output:
Enter two integers: 10 20
G.C.D of 10 and 20 is 10

Enter two integers: 25 75


G.C.D of 25 and 75 is 25

Result:
Thus a program to compute GCD of two numbers using C / C++ is successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 12

Date :
Exercise Number :1c
Title: Find the roots of a number (Newton‘s method)

Aim:
To write a C/C++ program to find the roots of a number (Newton‘s method)

Algorithm:
Newton’s Method:
Let N be any number then the square root of N can be given by the formula:
root = 0.5 * (X + (N / X)) where X is any guess which can be assumed to be N or 1.

 In the above formula, X is any assumed square root of N and root is the correct square root of N.
 Tolerance limit is the maximum difference between X and root allowed.

1. Assign X to the N itself.


2. Now, start a loop and keep calculating the root which will surely move towards the correct
square root of N.
3. Check for the difference between the assumed X and calculated root, if not yet inside
tolerance, then update root and continue.
4. If the calculated root comes inside the tolerance allowed then break out of the loop.
5. Print the root.

Sample Output:
Enter a Number : 100
Root of given number is : 10.032579

Enter a Number : 150


Root of given number is : 12.248141

Result:
Thus a program to compute the roots of a number (Newton‘s method) using C / C++ is
successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 13

Date :
Exercise Number :2a
Title: Find the maximum of an array of numbers

Aim:
To write a program for finding the maximum of an array of numbers using C / C++.
Problem Description:
In this program, we need to find out the largest element present in the array and display it. This can be
accomplished by
1. Sorting : Sort the array in ascending order and the last element will be at the last index.
2. Traverse : Traverse the array while updating the max value.

1. Sorting
To find the largest element from the array, a simple way is to arrange the elements in ascending order.
After sorting, the first element will represent the smallest element, the next element will be the second
smallest, and going on, the last element will be the largest element of the array.

Solution Steps
 Sort the array.
 Return the element at the last index of the array.
Pseudo Code
int largestElement(int[] arr, int size)
{
// sort the array in ascending order
arr.sort()
largest_element = arr[size-1]
return largest_element
}

2. Traverse
Take a max variable and initialize it with the first element of the array. Now start iterating over the
array and whenever a larger element encountered then update the max variable otherwise, move
forward.

Solution Steps
 Create a max variable and initialize it with arr[0]
 Iterate from the first idx to the last idx of the array:
o If arr[idx] > max then update max with arr[idx]
 Return max

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 14

Pseudo Code
int largestElement(int[] arr, int size)
{
int max = arr[0]
for(int i = 1 to i < size)
{
if(max < arr[i])
{
max = arr[i]
}
}
return max
}

Algorithm:

1. START
2. INITIALIZE arr[] = {25, 11, 7, 75, 56}
3. length= sizeof(arr) / sizeof(arr[0])
4. max = arr[0]
5. SET i = 0. REPEAT STEP 6 and STEP 7 i<length
6. if(arr[i] > max) max = arr[i]
7. I = i + 1.
8. PRINT "Largest element in given array:" assigning max.
9. RETURN 0
10. END.

Sample Output:
Largest element Present in given array: 75

Result:
Thus a program to for finding the maximum of an array of numbers using C / C++ is successfully
executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 15

Date :
Exercise Number :2b
Title: Remove duplicates from an array of numbers

Aim:
To write a program to remove duplicates from an array of numbers using C / C++.

Problem Description:
Removing or deletion of the duplicate elements from an array in the C programming language is
used when the same number of elements occurs in sorted or unsorted array, These elements in the array
are called the duplicate elements. And we need to delete these duplicate elements or same number from
an array to make the resultant array consists of unique elements.
Example :
There is an integer type array intarray[10] that contains { 5, 8, 3, 3, 5, 9} elements. In this array, 3
and 5 occurs two times. Hence, these elements are duplicate elements. So, after deleting the duplicate
elements from an array intarray[], we get 5, 8, 3,9 elements.

Algorithm:
1. Start
2. Input the size of an array and store into the size variable.
3. Use for loop to read the elements of an array and store in intarray[i] variable.
4. To get the duplicate elements from an array two for loops are used.
i. Where the first loop start from 0 to size. And the structure of the loop is: for
(i = 0; i < size; i++)
ii. Another loop selects each element of the array and compare with the
corresponding element to get the duplicate elements. And the structure of the
inner loop is: for (j = i + 1; j < size; j++)
5. To find the subsequent same element use the comparison:
if (arr[i] == arr[j]).
6. If any duplicate element is encountered, delete the duplicate element from an array and the size of
array is decrement by 1 such that, size = size - 1.
7. After that, print the unique elements of an array using the code
for (i = 0; i < size; i++)
{
printf ("%d \t" , arr[i]);
}

8. Stop

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 16

Sample Output
Enter the number of elements in an array: 10

Enter 10 elements of an array: 1 2 2 2 2 3 5 4 6 9

Array elements after deletion of the duplicate elements:


1235469

Result:
Thus a program to remove duplicates from an array of numbers using C / C++ is successfully
executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 17

Date :
Exercise Number :2c
Title: Print the numbers in an array after removing even numbers

Aim:
To write a program to print the numbers in an array after removing even numbers using C / C++.

Problem Description:
Implement a program which takes an array arr and its size and removes all the even elements
from a given array

Algorithm:
1. Start
2. Input the N array Elements
3. Create for loop starts from 0 to N
4. Inside the for loop, check whether the current element is an even number or not
If
it is an even number Ignore the number
Else
print the number
5. Stop

Sample Output :
Enter the number of elements in an array: 10

Enter 10 elements of an array: 1 2 3 4 5 6 7 8 9 10

Array elements after removing even numbers :


13579

Result:
Thus a program to print the numbers in an array after removing even numbersusing C / C++ is
successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 18

Date :
Exercise Number :3a
Title: Checking for palindrome
Aim:
To write a program to check whether the given string is palindrome or not using C / C++.

Problem Description:
A palindrome is a word, number, phrase, or other sequence of characters which reads the same
backward as forward, such as madam, racecar.

1. The program takes a string and stores it.


2. The string is copied into another string from backwards.
3. If both the strings are equal, then the entered string is a palindrome.
4. Else it is not.
5. The result is printed.

Algorithm:

1. Read a String from the user


2. Initialize 2 variables, low from the start and high from the end.
3. now while (h>l), we will check its equivalent character in the string.
4. if it’s not equal then it’s not a palindrome
5. else it will traverse half character and the string is a palindrome.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 19

Sample Output:
Enter a String :malayalam
malayalam is a palindrome

Result:
Thus a program to check whether the given string is palindrome or not using C / C++ is
successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 20

Date :
Exercise Number :3b
Title: Count the occurrences of each character in a given word
Aim:
To write a program to count the occurrences of each character in a given word using C / C++.
Problem Description:
A string is a one-dimensional character array that is terminated by a null character. Frequency of
characters in a string is the number of times they occur in a string.
Example:

String: Football is a sport


The frequency of alphabet o in the above string is 3

Algorithm:
1. Read the string entered by the user and store the string into the variable ‘string’ using gets(string).
2. The for loop iterates through the string with the structure for(j=0;string[i];j++) until
the last character of the string becomes null.
3. Initialize the j value to the variable n. j indicates the length of the string.
4. Count = 0.Now count the frequency of each character in the string,The outer for loop iterates
through the string with the structure for(i=0;i<n;i++),for each iteration it selects one
element string[i].
5. The inner for loop compares the string[i] with remaining elements of the string using for loop with
the struct for(j=i+1;j<n;j++). If it matches then increase the count value.
6. Print the count value which is the frequency of the selected element string[i].

Sample Output :
Enter a String : RMK_ENGINEERING_COLLEGE
Count the occurrences of each character in a given word:
'R' = 2
'M' = 1
'K' = 1
'_' = 2
'E' = 5
'N' = 3
'G' = 3

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 21

'I' = 2
'C' = 1
'O' = 1
'L' = 2

Result:
Thus a program to count the occurrences of each character in a given word using C / C++ is
successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 22

Date :
Exercise Number :4
Title: Generate Pay Slip

Aim:
To write a program to Generate salary slip of employees using structures and pointers using C /
C++.
Create a structure Employee with the following members:
EID, Ename, Designation, DOB, DOJ, Basic pay
Note that DOB and DOJ should be implemented using structure within structure.
Problem Description:
Structures (also called structs) are a way to group several related variables into one place. Each variable
in the structure is known as a member of the structure. Unlike an array, a structure can contain many
different data types (int, string, bool, etc.).
Create a Structure
To create a structure, use the struct keyword followed by structure Tag and declare each of its members
inside curly braces.
struct myStructure
{ // Structure declaration
int myNum; // Member (int variable)
string myString; // Member (string variable)
}ms; // Structure variable
Assign and Access Structure Members
To access members of a structure, use the dot syntax (.):

// Create a structure variable called myStructure


struct
{
int myNum;
string myString;
} ms;

// Assign values to members of myStructure


ms.myNum = 1;
ms.myString = "Hello World!";

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 23

// Print members of myStructure


cout << ms.myNum << endl;
cout << ms.myString << endl;

Algorithm:
1. Start
2. Declare Structure and variables
3. Read the number of employees.
4. Read basic details of the employee.
5. Calculate salary
6. Display the output of the Pay slip calculations for each employee using pointer.
7. Stop

Sample Output:
Enter Employee Id : 229
Enter Name of Employee : Vijayakumar
Enter employee Designation : AssociateProfessor
Enter employee Date of Birth : 21
Enter employee Month of Birth : 10
Enter employee Year of Birth : 1977
Enter employee Date of Joining : 06
Enter employee Month of Joining : 01
Enter employee Year of Joining : 2003
Enter Basic Pay of the employee: 60000

Pay Slip for the Employee :


Employee ID :229
Employee Name :Vijayakumar
Designation :AssociateProfessor
Date of Birth :21.10.1977
Date of Joining :6.1.2003
Basic Pay :60000.000000
Dearness Allowance :30000.000000
House Rent Allowance:9000.000000
CCA :3000.000000
PF :7200.000000
LIC :6000.000000
Gross Salary :102000.000000

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 24

Deduction :13200.000000
Nett Salary :88800.000000

Result:
Thus a program to Generate salary slip of employees using structures and pointers using C / C++
is successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 25

Date :
Exercise Number :5
Title: Internal Mark Computation
Aim:
To write a program to compute internal marks of students for five different subjects using
structures and functions using C / C++.

Algorithm:
1. Start
2. Declare variables
3. Read the number of students.
4. Read the student mark details
5. Calculate internal mark by I = total of five test marks / 5 for each subject per student.
6. Display the output of the calculations for all the students usinf structure and functions.
7. Stop

Sample Output:
Enter information of students:

Enter Student 1 Register Number : 1001


Enter Student 1 Name : Vijayakumar
Enter marks:
Enter Subject 1 Mark: 100
Enter Subject 2 Mark: 100
Enter Subject 3 Mark: 100
Enter Subject 4 Mark: 100
Enter Subject 5 Mark: 100

Enter Student 2 Register Number : 1002


Enter Student 2 Name : Mangaiarkarasi
Enter marks:
Enter Subject 1 Mark: 100
Enter Subject 2 Mark: 100
Enter Subject 3 Mark: 100
Enter Subject 4 Mark: 100
Enter Subject 5 Mark: 100

Enter Student 3 Register Number : 1003

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 26

Enter Student 3 Name : Kavinkumar


Enter marks:
Enter Subject 1 Mark: 100
Enter Subject 2 Mark: 100
Enter Subject 3 Mark: 100
Enter Subject 4 Mark: 100
Enter Subject 5 Mark: 100

Enter Student 4 Register Number : 1004


Enter Student 4 Name : Tamilarasan
Enter marks:
Enter Subject 1 Mark: 100
Enter Subject 2 Mark: 100
Enter Subject 3 Mark: 100
Enter Subject 4 Mark: 100
Enter Subject 5 Mark: 100

Enter Student 5 Register Number : 1005


Enter Student 5 Name : Ezhilarasan
Enter marks:
Enter Subject 1 Mark: 100
Enter Subject 2 Mark: 100
Enter Subject 3 Mark: 100
Enter Subject 4 Mark: 100
Enter Subject 5 Mark: 100
Displaying Information:

Register Number : 1001


Student Name Vijayakumar :
Subject 1 Subject Mark 100.000000:
Subject 2 Subject Mark 100.000000:
Subject 3 Subject Mark 100.000000:
Subject 4 Subject Mark 100.000000:
Subject 5 Subject Mark 100.000000:
Total Mark = : 500.000000
Average Mark = : 100.000000
Register Number : 1002

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 27

Student Name Mangaiarkarasi :


Subject 1 Subject Mark 100.000000:
Subject 2 Subject Mark 100.000000:
Subject 3 Subject Mark 100.000000:
Subject 4 Subject Mark 100.000000:
Subject 5 Subject Mark 100.000000:
Total Mark = : 500.000000
Average Mark = : 100.000000
Register Number : 1003
Student Name Kavinkumar :
Subject 1 Subject Mark 100.000000:
Subject 2 Subject Mark 100.000000:
Subject 3 Subject Mark 100.000000:
Subject 4 Subject Mark 100.000000:
Subject 5 Subject Mark 100.000000:
Total Mark = : 500.000000
Average Mark = : 100.000000
Register Number : 1004
Student Name Tamilarasan :
Subject 1 Subject Mark 100.000000:
Subject 2 Subject Mark 100.000000:
Subject 3 Subject Mark 100.000000:
Subject 4 Subject Mark 100.000000:
Subject 5 Subject Mark 100.000000:
Total Mark = : 500.000000
Average Mark = : 100.000000
Register Number : 1005
Student Name Ezhilarasan :
Subject 1 Subject Mark 100.000000:
Subject 2 Subject Mark 100.000000:
Subject 3 Subject Mark 100.000000:
Subject 4 Subject Mark 100.000000:
Subject 5 Subject Mark 100.000000:
Total Mark = : 500.000000
Average Mark = : 100.000000
Result:
Thus a program to compute internal marks of students for five different subjects using structures
and functions using C / C++ is successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 28

Date :
Exercise Number :6
Title: Class and Member access
Aim:
To write a program illustrating Class Declarations, Definition, and Accessing Class Members
using C++.

Problem Description:
A class in C++ is the building block that leads to Object-Oriented programming. It is a user-
defined data type, which holds its own data members and member functions, which can be
accessed and used by creating an instance of that class. A C++ class is like a blueprint for an
object.

Class Definition Example

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 29

Algorithm:
1. Create a class record.
2. Define the class Student
3. Include the data members Register Number Name and Percentage of a student
4. Include the Function members readDetails() and printDetails()
5. Define and invoke the function readDetails() and printDetails() using the object
6. Stop the program

Sample Output:
Enter Student Details
Enter Student Register Number : 1001
Enter Student Name : Vijayakumar
Enter Percentage : 100
Student Details:
Register Number : 1001
Name : Vijayakumar
Percentage : 100

Result:
Thus a program to illustrate Class Declarations, Definition, and Accessing Class Members using
C++ is successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 30

Date :
Exercise Number :7
Title: Constructors
Aim:
To write a program illustrating default constructor, parameterized constructor and copy
constructors using C++.

Algorithm:
Constructors in C++ can be defined as a special member method which will be called implicitly
(automatically) whenever an object of a class is created

Default Constructor
The default constructors can be defined as a constructor that does not take any arguments. It has no
parameters
Syntax:
class class_name
{
………
public:
class_name() { }; //default constructor
………
};
Parameterized Constructor
The parameterized constructor can be used to pass the arguments to the constructor.
Copy Constructor
A copy constructor can be defined as a member function that initializes an object using another object of
the same class.

Syntax:
class-name (class-name &)
{
...
}

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 31

Sample Output:
After Default Constructor
Register Number : 0
Name :
Fees Amount : Rs.0/-

After Parameterised Constructor


Register Number : 11175014
Name : Vijayakumar
Fees Amount : Rs.50000/-

After Copy Constructor


Register Number : 11175014
Name : Vijayakumar
Fees Amount : Rs.50000/-

After Member Function invocation


Enter the Register Number : 11175014
Enter the Name : Kamalakannan
Enter the Fee : 50000
Register Number : 11175014
Name : Kamalakannan
Fees Amount : Rs.50000/-
Result:
Thus a program to illustrate default constructor, parameterized constructor and copy constructors
using C++ is successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 32

Date :
Exercise Number :8
Title: Operator Overloading and Function Overloading
Aim:
To write a program to demonstrate Operator overloading and Function Overloading using C++.

Algorithm:
1. Start the program.
2. Declare the class.
3. Declare the variables and its member function.
4. Using the function getvalue() to get the two numbers.
5. Define the function operator +() to add two complex numbers.
6. Define the function operator –()to subtract two complex numbers.
7. Define the display function.
8. Declare the class objects obj1,obj2 and result.
9. Call the function getvalue using obj1 and obj2
10. Calculate the value for the object result by calling the function operator + and
operator -.
11. Call the display function using obj1 and obj2 and result.
12. Return the values.
13. Stop the program

Sample Output: Function Overloading


Sum of two integer numbers is : 3
Sum of three integer numbers is : 6
Sum of four integer numbers is : 10
Sum of two float numbers is : 15
Sum of three float numbers is : 26.5
Sum of four float numbers is : 52

Algorithm:
1. Start the program.
2. Create the class with variables and functions.
3. In the main(),declare the variables.
4. Use Volume() function to find volume of cylinder, cube and rectangle.
5. Define the volume() function with necessary arguments for calculation.
6. The values that are passed inside the function call will be matched with the definition
part and appropriate calculations are done.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 33

7. All the three volumes are displayed accordingly by display() function.


8. stop the program

Sample Output: Operator Overloading


Enter first complex number :
Enter Real part : 10

Enter Imaginary part : 15

Enter second complex number :


Enter Real part : 15

Enter Imaginary part : 20


Output Complex number : 25 + 35i

Result:
Thus a program to demonstrate Operator overloading and Function Overloadingusing C++ is
successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 34

Date :
Exercise Number :9
Title: Friend Function and Friend Class
Aim:
To write a program to demonstrate Friend Function and Friend Classusing C++.

Algorithm – Friend Function


1. Friend Function
2. Start the program.
3. Declare the class name as Base with data members and member functions.
4. The function get() is used to read the 2 inputs from the user.
5. Declare the friend function mean(base ob) inside the class.
6. Outside the class to define the friend function and do the following.
7. Return the mean value (ob.val1+ob.val2)/2 as a float.
8. Stop the program.

Algorithm - Friend Class


1. Start the program.
2. Declare the classes Rectangle and Square with necessary data members
3. Declare Rectangle as a friend of Square so that Rectangle member functions
4. could have access to the private member ofsquare
5. Convert the side value of square to height and width of rectangle using
convert function.
6. Input the side value from the user

Sample Output: Friend Function


Distance: 5

Result:
Thus a program to demonstrate Friend Function and Friend Classusing C++ is successfully
executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 35

Date :
Exercise Number : 10
Title: Inline Function
Aim:
To write a program to demonstrate Inline Function using C++.
Problem Description:
If we make a function as inline, then the compiler replaces the function calling location with the
definition of the inline function at compile time.
Any changes made to an inline function will require the inline function to be recompiled again
because the compiler would need to replace all the code with a new code; otherwise, it will
execute the old functionality.
Syntax for an inline function:
inline return_type function_name(parameters)
{
// function code
}
Inline Function Illustration

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 36

Algorithm:
1. Start the program.
2. Declare the class.
3. Declare and define the inline function for multiplication and cube.
4. Declare the class object and variables.
5. Read two values.
6. Call the multiplication and cubic functions using class objects.
7. Return the values.
8. Display.
9. Stop the program

Sample Output:
Enter two values: 5 7
Multiplication value is: 35
Cube Value is :25 and 343

Result:
Thus a program to demonstrate Inline Function using C++ is successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 37

Date :
Exercise Number : 11
Title: Function overriding
Aim:
To write a program to demonstrate Function overriding using C++.

Problem Description:
Function overriding in C++ is a concept by which you can define a function of the same
name and the same function signature (parameters and their data types) in both the base class and
derived class with a different function definition. It redefines a function of the base class inside
the derived class, which overrides the base class function.
Syntax :

public class Base

access_modifier:

// overridden function

return_type function_name(){}

};

public class Derived : public Base

access_modifier:

// overriding function

return_type function_name(){}

};

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 38

Overriding Illustration :

Algorithm:
1. Start the program.
2. Declare the base class with Function Member void print() { cout<< "Base Function" }.\
3. Declare another class derived that inherits from the base class that has the member
function void print() { cout << " Derived Function" }. as same as of that given in
base class.
4. Declare the class object for derived .
5. When the derived.print() is invoked, it overrides the function specified in base class.
6. Stop the program

Sample Output:
Derived Function

Result:
Thus a program to demonstrate Function overriding using C++ is successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 39

Date :
Exercise Number : 12 a
Title: Single Inheritance
Aim:
To write a program to demonstrate Single Inheritance using C++.
Problem Description:
Single Inheritance is defined as the inheritance in which a derived class is inherited from the
only one base class.
In the diagram under Single inheritance box labelled “Base Class” is the base class or Parent
Class, and box labelled “Derived Class” is the Child Class derived class.
It is the simplest among all the types of inheritance since it does not include any kind of
inheritance combination or different levels of inheritance. The child class can inherit all the
members of the base class according to the visibility mode (i.e., private, protected, and public)
that is specified during the inheritance.
Syntax
class BaseClass
{
// code of class BaseClass
}
class DerivedClass : AccessModifier BaseClass
{
// code of class DerivedClass
}

Algorithm:
1. Start the process.
2. Define the base class with variables and functions.
3. Define the derived class with variables and functions.
4. Get two values in main function.
5. Define the object for derived class in main function.
6. Access member of derived class and base class using the derived class object.
7. Stop the process.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 40

Sample Output:
Enter the value of x = 10
Enter the value of y = 20
Product = 200

Result:
Thus a program to demonstrate Single Inheritance using C++ is successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 41

Date :
Exercise Number : 12 b
Title: Multiple Inheritance
Aim:
To write a program to demonstrate Multiple Inheritance using C++.
Problem Description:
Multiple inheritance is the process of deriving a new class that inherits the attributes from two or
more base classes.
In the above diagram, there are two-parent classes: Base Class 1 and Base Class 2,
whereas there is only one Child Class labelled “Derived Class”. The Child Class acquires all
features from both Base class 1 and Base class 2. Therefore, we termed the type of Inheritance as
Multiple Inheritance.
Syntax
class BaseClass1
{
// code of class BaseClass1
}
class BaseClass2
{
// code of class BaseClass2
}
class DerivedClass:AccessModifier BaseClass1,AccessModifier
BaseClass2
{
// code of class DerivedClass
}

Algorithm:
1. Start the program.
2. Declare the base class student.
3. Declare and define the function get() to get the student details.
4. Declare the other class sports.
5. Declare and define the function getsm() to read the sports mark.
6. Create the class statement derived from student and sports.
7. Declare and define the function display() to find out the total and average.
8. Declare the derived class object,call the functions get(),getsm() and display()

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 42

9. Stop the program.

Output:
Enter the Roll no:100
Enter two marks
90
80
Enter the sport mark :90
Roll no :100
Total :260
Average :86.66

Result:
Thus a program to demonstrate Multiple Inheritance using C++ is successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 43

Date :
Exercise Number : 12 c
Title: Multi Level Inheritance
Aim:
To write a program to demonstrate Multi Level Inheritance using C++.
Algorithm:
1. Start the program.
2. Declare the base class Vehicle.
3. Derive the class Four-wheeler from Base class.
4. Derive the class Car from Four-wheeler.
5. Create an object of Class car.
6. Access the methods of class Four-wheeler and Vehicle.
7. Stop
Problem Description:
Multilevel inheritance is a process of deriving a class from another derived class. In C++
programming, not only we can derive a class from the base class but we can also derive a class
from the derived class. This form of inheritance is known as multilevel inheritance.
Syntax
class BaseClass1
{
// code of class BaseClass1
}
class DerivedClass1 : AccessModifier BaseClass1
{
// code of class DerivedClass1
}
class DerivedClass2 : AccessModifier DerivedClass1
{
// code of class DerivedClass2
}
Sample Output:
I am a car
I have four wheels
I am a vehicle

Result:
Thus a program to demonstrate Multi Level Inheritance using C++ is successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 44

Date :
Exercise Number : 12 d
Title: Hierarchical Inheritance
Aim:
To write a program to demonstrate Hierarchical Inheritance using C++.

Algorithm:

1. Start the program.


2. Declare the base class Shape.
3. Derive the class Rectangle, Circle, Squarefrom Base class.
4. Inherit the members of Class Shape in Rectangle, Circle and Square.
5. Calculate the Area of Rectangle, Square and Circle.
6. Stop
Problem Description:
Hierarchical inheritance is defined as the process of deriving more than one derived class from a
single base class. Hierarchical Inheritance in C++ refers to the type of inheritance that has a
hierarchical structure of classes. A single base class can have multiple derived classes, can
further inherit these derived classes, forming a hierarchy of classes.
Syntax
class BaseClass
{
// code of class BaseClass
}
class DerivedClass1 : AccessModifier BaseClass
{
// code of class DerivedClass1
}
class DerivedClass2 : AccessModifier BaseClass
{
// code of class DerivedClass2
}
class DerivedClass3 : AccessModifier BaseClass
{
// code of class DerivedClass3
}

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 45

Sample Output:
Enter Length: 12.4
Enter Breadth: 23.1
Area of Rectangle : 286.44
Enter Radius: 14
Area of Circle : 615.44
Enter Side: 3
Area of Square : 9

Result:
Thus a program to demonstrate Hierarchical Inheritance using C++ is successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 46

Date :
Exercise Number : 13
Title: Pure Virtual Function
Aim:
To write a program to demonstrate Pure Virtual Function using C++.
Problem Description:
Pure virtual Functions are virtual functions with no definition. They start with virtual keyword
and ends with = 0. Here is the syntax for a pure virtual function,
Syntax 1
virtual void functionname() = 0;
Note: The = 0 syntax doesn't mean we are assigning 0 to the function. It's just the way we define
pure virtual functions.
Syntax 2
virtual void functionname() {}
Pure virtual functions are used
 if a function doesn't have any use in the base class
 but the function must be implemented by all its derived classes
Let's take an example,
Suppose, we have derived Triangle, Square and Circle classes from the Shape class, and
we want to calculate the area of all these shapes. In this case, we can create a pure virtual
function named calculateArea() in the Shape. Since it's a pure virtual function, all derived classes
Triangle, Square and Circle must include the calculateArea() function with implementation. A
pure virtual function doesn't have the function body and it must end with = 0. For example,
class Shape
{
public:
// creating a pure virtual function
virtual void calculateArea() = 0;
};

Algorithm:

1. Start the program.


2. Declare the base class with a pure virtual function.
3. Derive the class D1 and D2 from Base class.
4. Define the function in D1 & D2 ,derived from base class.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 47

5. Assign the address of objects of D1 & D2 to the pointer of Base class.


6. Execute the functions defined in D1 & D2.
7. Stop

Sample Output::

It is the first derived class


It is the second derived class

Result:
Thus a program to demonstrate Pure Virtual Function using C++ is successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 48

Date :
Exercise Number : 14
Title: File Handling
Aim:
To write a program to count the number of account holders whose balance is less than the
minimum balance using sequential access file using C++.
Problem Description:
Files store data permanently in a storage device. With file handling, the output from a program can be
stored in a file. Various operations can be performed on the data while in the file.
Achieve the File Handling
For achieving file handling we need to follow the following steps:-
Step 1 : Create a File.
Step 2 : Opening a file.
Step 3 : Writing data into the file
Step 4 : Reading data from the file
Step 5 : Closing a file.
The fstream Library
The fstream library provides C++ programmers with three classes for working with files. These classes
include:
Ofstream : This class represents an output stream. It’s used for creating files and writing information to
files.
Ifstream : This class represents an input stream. It’s used for reading information from data files.
Fstream : This class generally represents a file stream. It comes with ofstream/ifstream capabilities. This
means it’s capable of creating files, writing to files, reading from data files. The following image makes it
simple to understand:

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 49

Algorithm:

1. Start the program.


2. Define a structure containing the basic details of bank customer.
3. Declare the file pointer *fp.
4. Declare the Switch case Statement.
5. Open the File and store the Basic Details of bank Cusstomer.
6. If the option to find Minimum Account Balance is selected.
7. Execute the functions defined in D1 & D2.
8. Stop
Problem Description:

Sample Output:

The Number of Account Holder whose Balance less than the Minimum Balance is 3

Result:
Thus a program to count the number of account holders whose balance is less than the minimum
balance using sequential access file using C++ is successfully executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 50

Date :
Exercise Number : 15
Title: Exception Handling
Aim:
To write a program to demonstrate the Catching of all Exceptions using C++.
Problem Description:
Exception Handling
Exception Handling in C++ is a process to handle runtime errors. We perform exception
handling so that normal flow of the application can be maintained even after runtime errors.
In C++, exception is an event or object which is thrown at runtime. All exceptions are
derived from std::exception class. It is a runtime error which can be handled. If we don't handle
the exception, it prints exception message and terminates the program.
C++ exception handling is built upon three keywords: try, catch, and throw.
Syntax
try
{
// Block of code to try
throw exception;
}
catch ()
{
// Block of code to handle errors
}
Code within a try/catch block is referred to as protected code

Algorithm:

1. Start the program.


2. Declare try block calling a function named division.
3. Define throw statement inside function.
4. Declare Catch to handle zero division Exception.
5. Stop

Sample Output:

Division by zero condition!

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 51

Result:
Thus a program to demonstrate the Catching of all Exceptions using C++ is successfully
executed.

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 52

Date :
Exercise Number : 16
Title: Mini Project

Learning a new programming language is both the most exciting and the most humbling
experience. And as every coder knows, the best way to learn a language is to apply it in a
project. The best way to get an idea is to find out simple problems and then trying to automate
them.

Steps involved in doing a Mini Project

 Chose an idea/project.

 Try to choose a topic to work on for your project. Keep your capabilities in mind as well
as the impact it will have. Remember that it should add a value to your resume

 Try to formulate your ideas

 Write your ideas into a document/report so that people will understand what you are
trying to accomplish, what features your project will have and what it will not.

 Start implementation

 Start coding your ideas. If you need to learn a specific library/framework in C++ for your
project, then start with it

 Code your project step by step in terms of modules. If you encounter any problem use
online forums Google, stack overflow etc to clear your doubts/hurdles you encounter
during solving these problems.

 Write a report

 Write a report which includes your idea of this project, difficulties you faced, features
included, possible improvements, etc in the report.

 Place your code online, on online repositories like github, gitlab, bitbucket etc so
that you can showcase your project

 There you go, you have your project done and hosted online so that people can verify. Go
ahead and add it to your resume

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 53

List of Mini Projects


1. Login and Registration System
2. Contact Management System
3. Address Book Management
4. Personal Diary Management System
5. Student Record Management System
6. Student Report Management System
7. Library Management project
8. Bookshop Management System
9. Bookshop inventory system
10. GPA / CGPA Calculator
11. Digital Calculator
12. Employee Management System
13. Payroll Management System
14. Calendar
15. Traffic Management System
16. Bus Reservation system
17. Hotel Booking System
18. Hospital Management System
19. Store Management
20. Billing System
21. Car Rental System
22. Bank Management System
23. Credit Card Validator

24. Currency Converter


25. Sudoku Game
26. Snake Game
27. Tic-Tac-Toe Game

In today’s world, C++ is one of the most pertinent programming languages. Nevertheless,
understanding it can be a bit challenging for beginners, hence the projects will help you master
it. Above mentioned C++ project ideas could demonstrate to be most suitable for you to learn
something new and exciting. You can select the one that thrills you more and guides you extra.
Few are easy, and few are a bit tricky, but your job is to tinker with every project to explore your
hidden skills and talents. These projects also help if you nail your dream job.
https://www.simplilearn.com/tutorials/cpp-tutorial/cpp-projects-for-beginners

Theory Course with Laboratory Component


22CS101 – Problem Solving Using C++ 54

Theory Course with Laboratory Component

You might also like