Search for notes by fellow students, in your own course and all over the country.

Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.

My Basket

You have nothing in your shopping cart yet.

Title: C++ notes
Description: Full c++ notes beginner friendly

Document Preview

Extracts from the notes are below, to see the PDF you'll receive please use the links above


INDEX

| C++ FULL NOTES |
1
...
OOPs Concepts in C++ | Object Oriented
Programming Pillars

3
...
Features of C++ Programming Language
5
...
Basic Structure of a C++ Program
7
...
Keywords and Identifiers in C++

9
...
Data Types in C++ - part 2 | float Data Type
11
...
Wide Character (wchar_t) Data Type in C++
15
...


Input and Output in C++

18
...


19
...

21
...

23
...

25
...

27
...

29
...


Operators in C++ Programming- part1 | Arithmetic
and Relational
Operators in C++ - Part3 | Assignment and
Miscellaneous operators

Operators Precedence and Associativity in C++ - part
1

Operators Precedence and Associativity in C++ - part2
C++ Control Structures - part 1 | if statement

C++ Control Structures -part 2 | if else Statement
C++ Control Structures -part3 | else if ladder
Statements

C++ Control Structures - part4 | Nested if and Nested
if else
Switch Case statement in C++ Programming
Introduction to Loops in C++

Loops in C++ | for loop in detail
Properties of for loop in C++

Coding Exercise with Solution for beginners in C++

31
...


Do-while Loop in C++

32
...


Coding Exercise for Beginners with Solution | While
Loop in C++ | part2
Coding Exercise for Beginners with Solution | dowhile loop in C++

What is Object Oriented Programming
(OOP) | POP vs OOP

Program is divided into parts that are known as
procedure or function so program is divided
...
Data movement is more so
data is less secure in this case this function can update
this data so data would be less secure
...
Large and complex scalable
applications the applications which require actively
updated and maintenance this approach is not suitable
for those things because there are interdependency
among these functions many functions are there calling
each and every function something like this
...
The main part
of this video is just to get you familiar with object
oriented program and how it is different from pop so
how data security comes here
...
Without classes or
objects we can not write down a program

OOPs Concepts in C++ | Object Oriented
Programming Pillars

The key to success in any interview specifically in
programming interview coding interview is practice
practice practice as much as possible
...
These four are known as the
pillars pillars of object oriented programming but we
will discuss these six things all these six concepts
...
Class is what it is just a
blueprint or a prototype through which we can create
objects
...
The
code and functions of each object can interact with
each other with the help of message passing and for
interacting they do n't need to have the internal
knowledge of their data and code
...
In large scale application there is a
large code base if you go in the detail of each and every
function then it would take you months to read out all
the functions and you would never code right so rather
than going into the detail just showcase the relevant
details only showcase those details hiding the
implementation detail that is just abstraction like when
you switch on your fan you do n't know what is
happening behind there
...
can walk can uh you
know eat can do these kind of things but how they do
n't know the implementation detail so that is simply
obstruction in programming also we can achieve
obstruction but how we will discuss later
...
The data is private to mechanical
department only the faculties or employees of that
department can access that data so this will increase
the privacy the security of the data
...
Overloading
allows a child class to override a function which is
already defined in its parent class right like let us take
that example real life example
...


Introduction to C++ Programming

we 'll be discussing some basic points So you can say
introduction to C plus plus programming language
...

C plus plus is an extension of C superset of C language
...
it is not purely
objectoriented programming language because some
features like friend and virtual classes violate those
Oops features right
...
C plus plus is a general
purpose programming language
...
The idea comes from this this
operator increment operator, which means we are
adding one value
...

C
...


Features of C++ Programming Language

We will discuss some features of C plus plus
...
These features like so it
supports Oops concept that is why it is object oriented
programming
...
The concept of classes
...
It is same as C
...
We use the c out the header files and all or

int main then you can also write return 0 here so this is
simple program right that is why it is sometimes it 's a
wifi questions
...
So it is faster
and see many factors are there with which makes this
language fast right it just Uh just want to tell you the
features that is
...
it combines
the features of both low-level programming as well as
high-level programming
...
You know why we call it
as powerful or you can say robust language because it
supports many builtin functions predefined functions
already in addre files and the libraries
...
you can create your own userdefined data types also with the help of classes
...
According to your requirement, you can take
the memory from the heap you can free the memory
right so memory management is in your hand
...
the Cyborg Button gives the C plus
programmer more options right but in Html and in I
think SqL also those are not case sensitive
...
Anything any variable you have to declare first
...
Then

you can use that thing right that is why it is known as
strongly typed programming language
...


History of C++

Some obsolete features were removed from this this
one from this version, and this was known as C plus 17
...
It was unused and
reserved that 's the sticky one in 11
...
removed in C plus plus 17 version and many new
header files and libraries were added in this one
...
we 'll discuss in detail in this video with the
help of a program as well
...
these
sections are not compulsory, but two sections or three
sections are compulsory to include in your program
...
You can include this This is multiple
line command
...
the concept of name spaces comes and
everything they group into namespaces
...
name conflicts Now what
does this name conflict see so I guess this is clear why
we include these header right generally in
...
These are defined in
library files
...
So if you want to use input output
related things, the objects or functions you use which
header io string right
...
same name of any function
object or classes can be used right so if name is same,
then there would be no conflict like this if I have and
you can create your own namespace
...
name space is
just provide scope
...
scope resolution is why it is known as
scope resolution
...
operator operator seen so if
name space is
...

How to write class your class name
...
main function is compulsory main
...
You can declare those thing and the
statements are executable statements
...
If there are any
other userdefined functions you have taken
...
Io stream rotates here
...
line comment and
these two lines are within multiple line commands
...
section
...
macro definition Pi 3
...
This is global
declaration in our variable R is equal to 2 and void area
A function area
...
you have to tell that the file is iostream the
header and the name is c out scene
...
This is the program which is having all the sections,
but all these sections are not compulsory
...
If you do n't want to
use all the things whatever is there in StD
...
I want to
...
StD
...
StD scope resolution E
and DN using StD scope resolution C in that's it right so
I will see you in the next video till then bye Bye take
care
...
You will write it starting at two numbers and
these kind of things
...
You can say right and what
software generally do they manage the information
...
in single quote
...
This is also
character constant
...
If i write 3 is different from this 3
...

So character constant we store generally we stored in
the computer memory
...
value 10 is the
correct definition
...
How you
can write a constant or you can define a constant right
...
This would be valid
...


variable is just a named memory location of the name
of the memory location where we store the data
...
Any data can be there
...
No special
characters are allowed
...
it 's not compulsory that you
have to define you know after header file only has to
find just name of the constant I am taking suppose by
3
...
variable like
n 50 or
...
constant is what the
value the value can not be changed in the program so
generally if you want that this value should be fixed like
Pi
...
by these values before the compilation
start by the preprocessor right
...
I think the
difference between
...
variable
...
StD
...
We also have multiple predefined
functions which you can perform with string
...

it is a constant, so you can modify it error is there
assignment of readonly variable
...


Keywords and Identifiers in C++

We 'll talk about keywords and identifiers in C plus plus
programming language
...
You can not write a program without
these two things
...
the video
would be really very helpful for you guys and I 'll show
you these facts on my laptop now while writing a
program
...
We give to anything in a program
...
So this is identifier nothing but identifier right
...
1999 students used to get
confused in these things
...
They think this include this is a keywords
...
See this program and how many keywords are
there in this program
...
We
can use alternative something like this
...


These are also predefined identify
...
Here is a list of predefined
some predefined identifiers
...
C out is equal to 45 right and
maybe you will think rather than writing StD here
Simply we can write map using name space
...
You can use these as a
name of variable as a new function right, but we should
not do this thing
...
right see it is
giving error expected an identifier here
...
But the C out
main io stream include C in
...
We 'll discuss in this video with the help of a
program
...
I 'll
show you how to apply for a job opening which Vx4

weeks has brought for you guys
...
We
have different different size of compartments like us
big one
...
Or for storing rice big one
...
second thing,
How much memory you need the size, How much
space you need how many bytes two things it will tell
so how to write these thing in a variable
...

The header I O stream dot H we are using the name
space space Std then main in main
...

kind of values The output so let me just draw that circle
first here see this is circle for unsigned short from 0 to
1-2 3 4
...

Maximum number
...
negative side minus 1 minus 2 minus 3 till minus
minus 3 2, 7 6 8
...
you just draw these
circles
...
unsigned short is out
of the range
...

According to you let 's run the sent same it will give

warning
...
It is printing three two seven six seven,
but actual value is minus 3 2 7 Music
...
?

Data Types in C++ - part 2 | float Data
Type

I 'll show you how you can use this in your program
...

Floating point numbers like 3
...
We have float Ah
...
If you write this thing, how we will write this
data type float then variable name suppose i am taking

f or not f
...
double
...

Precision digits are up to fifteen digits
...
after that
three three digits would be any garbage value after
that it may print some garbage value right
...


numbers these you know data types are used to store
decimal numbers and exponential numbers also in e
form
...
This floating numbers are stored in the
system completely different from the int number how
in number are stored
...
They represent this
number in binary form and the scaling factor would be
in binary number
...

floating point numbers are to be stored internally right
but for the data types
...
for float is it is minus 3
...
7 E plus 308 plus 308 for double
...
7 plus 308
...
long double a triple nine point one
two three four six
...
we have this
function set precision right now it will not give any
error right so and see one more thing
...
if you want to set the precise

value like set precision 10, but see it is what saying set
reason is undefined because this is not in this header
files
...
This is how you can right now
...

you have to set the precision digits for float numbers
float double long, double and float double different for
each not same here I am setting same for each this
data type
...
We have this line C out and
return 0 means successfully we have exit did from this
program right so it is not taking this line into
consideration
...
If you find out
anything any problem, then you can ask me in
comment box you can just send us
...
In every interview, technical
round of you know, and every company they ask this
question from this subject data structure and algorithm
so you need to practice questions on DSA and
algorithms right
...
There is one
platform, Geeks4Geeks, that you will get a lot of
questions on each topic like in data structure you can

say arrays, stack, stack link list
...
1 bit is for sinus
that must be whether it's negative or positive
...

Computer programming languages have one
characteristic using a character system; entire
languages can be converted into integer form using
character system
...

In the next video we will see how the cad data type is
clear to you guys if you have any doubt you can ask me
in comment section now
...
If you
have any doubt, you can ask me in the comment
section
...

This is almost the same as the ah cad type, which is
used to store those alphabet digits (you can say the
letters or special symbols, punctuation marks, and
these things), but there are a few differences
...
For storing
those things, we can't use this cad type because it only
allows for 256 values
...
Unicode's latest version (version 14
...
0 are coming in September
...
For example, you need to use only caret
data when working with wide characters because this is
now considered as a wide character
...
For capital letters,
let's see the unicode encoding: u plus zero zero zero
four one
...
For simple strings, we have
predefined functions to find out string lines like strle
and you can also concatenate two strings
...


Bool and void Data Types in C++

Data type in c99 was in how we were using this data
type when we were discussing c language the link I'll
put in this button you can check out that video right
...
Data type data type
...
Some
...
machine it is
taking one byte only so generally we say that that you
know that that
...

void data type
...

We can use the void data type like an integer type, by
writing down its address in parentheses
...
In expressions, we can write down
these things like "suppose I am right" or "I am not
taking this whole data type" and then list the variables
and their values
...
In this video,
we will learn about the void and wool data types
...


Input and Output in C++

In C++ programming language, we will discuss how to
take input from the user, how to print output with the
help of a program, and show you right
...
In this standard
library, we have four standard input output objects
...
The
error is not to be stored just generally you can print the
error message and buffer this is unbuffered and buffer
log
...
String
...


In this stream, std is used to resolve name conflicts
...
In this file, we're using the namespace std as our
name namespace
...
If
you do this kind of switching in output, you first have to
put the operator insertion operator back in
...

Now let me show you this thing on my laptop
...
Then, let me
just show you these objects
...
These four are for white character
because here also we have support for white
characters
...
For those we use wc in w c o w and
w c low
...

out is linked to standard output
...

I'll try to answer those queries right now, see you in the

next video
...
You can message me on
my Instagram account if you have any questions
...


Operators in C++ Programming- part1 |
Arithmetic and Relational

In the series of learning C plus programming language
in the previous video, we have discussed input and
outputs in C plus plus
...
operators
...
You will be confused
so let me just take one example like if you write
suppose I am taking two variable a is equal to 10 and i

'm just printing C out a mode B equal to right and a
mode 3 is what it will give you remainder
...
Right now first, it will
return the value original value 10
...


We will discuss the precedence of some of the most
complex type of questions in this video
...
we can not write like plus
plus plus a plus 3 plus 3
...
we have this file operator stored CPp I have
already created this file because we do n't need to
write any complex code
...
Let me just
comment out all the other operators here all right
...
are discussing arithmetic operators
...
after printing X value I want then y
values should be printed in the next line, so i am

writing handle just these operators insertion operators
and end right now
...
A relational operator
you can not likely use
...
We 'll discuss
logical and bitwise operators
...
Operand operators
work basically they uh work you know on the method
of short circuiting i hope you know what is short circuit
or let me just discuss this thing also so these both the
operators you can say they perform short circuit
evaluation
...
In some
situation maybe you want to check two three four
conditions and we want all the conditions must be true
then only we can do something then you will perform
logical and operator right suppose if i say if camera is
there and board is there whiteboard and marker is
there then only i'll shoot the video means all the three
conditions should be true
...

If I separate 1, 2, 4, 8, 16, 32, 64 like this, 128 would be
the result
...
Plus 8 would also be the result of adding 1 to 128
...
32 would
be the result of adding 32 to 128
...
Under these places we have
1 and 1 plus 8, 8 plus 1 that is 9
...
I hope
you now know how to convert decibel into binary and
bits by bit super form operation
...
It will give
two's complement fine (now left shift and right shift c
on x)
...
If
I say x right shift 1 means right shift that side this is
right side, this is the left side so right side 1 bit from
right side would be discarded
...
So 8

plus 4 plus 1 plus 1 that is 13
...
I hope you would right now let me show you
practical
...

The more you explore the C++ programming language,
the more you will learn about the operators available
to you
...

Until then, goodbye!

Operators in C++ - Part3 | Assignment and
Miscellaneous operators
The assignment operator will do whatever the value in
the right hand side it would be assigned to the left
hand side
...
The conditional operator will use
three operands
...
If condition is true first
expression would be evaluated, meaning output would
be this one if condition is false this would be the

output that's it so it would be
...
In the
next video we will see operator precedence and
associativity in c plus plus
...
We'll discuss two or three complex
examples on operators
...


Operators Precedence and Associativity in
C++ - part 1

Bodmas rule means the order in which operators are to
be executed, and like you have heard bodmas rule, you
must have heard it I guess
...
So first
now you will solve this thing so 3 plus 2 is 5, then 5 into

5 25
...
See, in both the cases you are getting
different result just by changing a little bit
...
This is a little bit complex in this expression,
we have many operators
...
After that, this mode six mode seven
mode will give the remainder
...
Other than 0 is true right now
...
We
have four variable abcd the values are something like
this: and in y this is the expression a divided by b this is
bitwise xor c into a mode in bracket we have c
...

When you move left to right this would be discarded
and finally the whatever the value at the right hand
side at last it that value would be returned
...
Plus (+) and
minus (-) work as you would expect, but the more
interesting expressions are those with plus d c plus d
and left shift (LSH) d and minus 2 (MIN)
...
First, the plus d c
plus d expression works as you would expect
...
This expression can be
evaluated using precedence and associativity (see
below)
...
The LSH d expression
shifts the first operand one position to the right, while
the minus 2 (MIN) expression flips the sign of the
second operand
...
This expression can also be
evaluated using precedence and associativity (see
below)
...
I'll tell you some important
points about operator precedence, and how actually if
you have an expression then how actually that
expression would be evaluated behind the scene
process
...
m
...
There is a five percent
penalty for each wrong submission so better to go
through that compile and test against their sample test
cases before submission
...
Precedence and
associativity is completely a compile time concept,
independent of that order of evaluation right in which
order the expression, subexpression or the arguments
of a function is to be executed
...
First, you'll need to type out "x" and "y",
which will give you the coordinates of where your text
will be printed
...
Finally, you'll need to use the "prefix"
operator to tell the compiler that this expression will
have a left-to-right associative order
...

We have some sequencing rules so you can visit this
website, which is one of the best websites to refer for
C++ reference
...


C++ Control Structures - part 1 | if
statement

I 'm going to start control structures in C plus plus
programming language
...
We
have also shown you how to apply precedence and
responsibility and when to use these things we have
shown you everything about residence and
associative
...

No we can do some tricky things with this if statement
so we'll be discussing some tricky questions with help
of this statement that generally they ask in competitive

exams or interviews
...

Three or four examples right now
...
This is just a flowchart of general
working of
...

The flowchart is the entry main then me money that
money variable would be located located located some
space in the memory
...
after that you can say
exit so in this case let 's see this is this is the flow then
after if law now output output output would be Kofi in
Starbucks Let "s go home" if I write 5 1500 rupees
...
if money is
equal to 1000 rupees, then only we will have coffee in
starbucks
...
if
block statement would be executed then after it if I
enter money 0 now 0
...
block it will simply
print let 's go home
...
If I write any constant value like 100, so
always it would be true
...

If log means there is no use of checking the condition
here right so this is the thing now if I write like equal to
thousand equality check condition equal to equal to
...
If I run this and we have only 400 rupees
then let 's go home no coffee in starbucks This time
right if now see let me just terminate this line with a
semicolon
...
You can
write down so you can try out these combinations also
right I hope that 's it for this video now so if you have
any doubt in this blog
...


C++ Control Structures -part 2 | if else
Statement

e have discussed the if statement
...
We will discuss what tricky type of
questions an interviewer can ask from you or whatever
kind of questions you will get in those competitive type
of exams
...
The working of this is what if
this condition is true, then control will enter into this if
block and whatever condition you will write within this
if block will be executed right
...
Control will go to the
else block and this would be executed
...


Let's just run this program first okay so we have this
program header file using namespace studio then main
function i 'm declaring a variable into money
...
then after if it fails block
statement let us go home would be printed right now
what tricky things you can do with this like if i put
semicolon here what would be the output
...
not write down else
but without else you can write down if that we have
discussed in previous video
...


C++ Control Structures -part3 | else if
ladder Statements

In the series of learning C plus programming language,
we are discussing control structures in C plus plus
...
First of all, we'll see that thing
...
You will get ear wise
from 10 to 21 verbal aptitude
...
After that you'll get answers answer
key and then answers and then answer with
explanation
...
As soon as a condition is true, the
corresponding statement to that if would be executed

and the remaining condition the remaining statement
would be skipped then directly control will go to
statement abc which statements you have written after
this else will be skipped
...

If you have no multiple choice questions, you can use
the ElsitA now alternative of the sensitive letter
...
One
more control structure we have is the switch
statement
...
" Let's have
coffee in Starbucks
...
Let's
go home that would be printed directly
...


C++ Control Structures - part4 | Nested if
and Nested if else

We are discussing control structures in C++
programming language
...
Now the next is
nested if and nested if else so we can do nesting of if as
well as nesting of effects
...
This test is a
miniature version of a real gate exam simulation
...
When we have
multiple conditions more than one condition to check
and these conditions are dependent on each other,
then we use these kind of scenario nested ifs
...
See this is suppose we are executing the
program the entry then we got condition one this one
two cases can be there right if this is true if this
condition is true then only we will enter here then
condition 3 and up to condition n
...
Otherwise, you can have coffee at CC'd (a
normal coffee shop), or coffee and then let go home
...
If you know
how to do this, it's your assignment!

Switch Case statement in C++
Programming

Switch case statement is a substitute for that long if
else statement else if letter lc plc fails offensive so you
can substitute that thing with the help of switch case
statements
...
It is a three days sale
during these days, and you will get a flat 15 percent
sitewide discount on the entire website of these
services
...
Once the main
reason is clear, the expression should be evaluated in a
constant value integral value
...


What this also will see first of all, is that let me just try
down
...
You
can write a plus b, but you have to declare b also, b is
equal to 4
...
Like a
less than two, not allowed
...


The program is simple, working off a switch case
statement
...
If the number
of case statements is checked, the program proceeds to
the default statement
...
If the case two
value is not matched, the program proceeds to the next
default statement
...
If there is no match, the
program will output "out"
...
The characters "char" can also be
represented with a sky code
...
Float values
are not allowed at this time
...

default is at the first at the beginning and after that

there is no break so it will continue the execution of
the character
...
Now, it will break out of the switch
case that is why if you write down default in the middle
of the program or at the starting not at the end then it
is compulsory to write down this break
...
You can
say then if it lasts, enter the operator or enter your
choice
...
If I enter minus, it will subtract subtract
or multiply it will multiply
...


Introduction to Loops in C++

We will be discussing some introduction to loops basics
like what is loop and why you need loops
...
I just want to tell
you one thing on Geeks4geeks
...
In this UH series
...
the main thing is you have to write this thing c out
output and this is what you can say for outputting
something on the screen in C plus we use C out this
object Hello world now on the output screen one time
Hello world would be printed
...
if I say print this Hello
world thousand times can you write thousand times
...
three
basic things in loop
...
Three basic basic things are there one is
initialization
...
third thing is update update like
increment or decrement
...
Three
...
This kind of thing
...


We use loops when you want to execute a statement or
group of statement multiple times
...
entry control means first condition
would be checked in a program like
...
If condition is true, then only only you can
enter into the body of the loop
...
If conditions are not matching it's
okay and if both are matching
...


Loops in C++ | for loop in detail

We will talk about for loop right
...
The working basically it is very
important to understand the working of the loops
working off loops each loop four
...
using loop is
better to use loops than using loops to reduce number
of lines of code
...
using
loops is a way of reducing the number of times
...

before using a variable we have to declare this variable
...
first is initialization so in the
memory we have variable I and the value variable is
one okay first step is this one second step is what this
now
...
If

condition is true control will enter into the loop body
and print one of the numbers printed on screen
...
I know if
you are a beginner
...

the flowchart is a simple flowchart of this button right
now this is simple syntax
...
have to tell in comment
section from this thing
...

create a new file for loop Dot CP2 simply include
iostream
...
to one equal to is what only assignment
...
true other than 0 that would always be true
...

In the previous video, we talked about for loop in C and
its basics
...
The top educator will be
copying all the subjects of CS and ID in this batch and
some special classes will also be conducted
...
Only two semicolons are allowed in

this for loop, and only comma can be put if you put
comma you will get an error syntax error
...


Coding Exercise with Solution for
beginners in C++

I'll explain the solution step by step but first you try out
pausing the video and trying this out
...
In for loop, we have to do
two things: find out or to calculate sum of four integers
from 1 to 15 and 1 and 15 both are included, which
using for loop
...
I'll explain this
program step by step
...
Putting these curly braces if you
want to put them can put curly braces here and here
...
Sum plus i would be
initial that would be assigned to the sum: now sum is 0
...

Now I plus plus plus: now i becomes 2
...
Condition is
true
...
The next video will show the range-based for
loop, or better, why loop: because for range-based for
loop you need to have some understanding of arrays
and vectors
...


While Loop in C++

We will be discussing what is while loop syntax or while
loop flow chart
...
While loop is what you
can write it executes a block of statements as long as
the condition the given condition is true now what is
syntax of while loop see you simply write y keyword
here you will put some condition termination
condition
...
Exit control means while
exiting the loop we will check the condition while
exiting will not check any condition right like when you

go in metro then while you entering while you will
enter into the metro before entering they will check
you if you have any suspicious item or not
...


We can use a while loop to help users with the help of
a program
...
First, we will write like for user
validation
...
Using the swine loop, we can put
condition in while loop while we have to put semicolon
here while this n greater than 0
...
After that, in c out we can do something like this
...


Coding Exercise for Beginners with
Solution | While Loop in C++ | part2

We will be discussing loops in the C++ programming
language
...
We
will also show you some examples of programs using
loops
...
I am just asking
for value of i in the while loop, and printing i plus plus
...

If I enter "if I enter like minus 3 you will get minus 3
minus 2 minus 1
...
If I enter "if

I enter like minus 3 you will get minus 3 minus 2 minus
1
...
If I enter "if I
enter like minus 3 you will get minus 3 minus 2 minus
1
...
If I enter "if I enter like minus 3 you will get
minus 3 minus 2 minus 1
...
If I enter "if I enter like minus 3 you will get
minus 3 minus 2 minus 1
...
See, if I enter "if I enter like minus
3 you will get minus 3 minus 2 minus 1
...


Do-while Loop in C++

If condition is not true body of the loop will not be
executed right not even once but here at least once
these statements will be executed irrespective of the
condition
...
After that, after executing once this condition
would be checked
...

This type of thing happens
...

This is the condition right
...


The program prints "c out", and then "just i Jenny"
...
After this,
the program prints "just to indicate end of this loop",
and then returns 0
...
Then, I'm printing
"example"
...
Now i is greater than 0, so the
program prints "i 2 3 4"
...
However, the condition on the next line is not
true, so the program continues printing "and out of
loop right the condition is not true but still it is printing
higher than you one time right now see i 'm just
making one difference here"
...
In
the next video, we'll discuss this using a while loop
...

However, because you will just keep entering yes if you
want to continue, I'll just type in "yes"
...
If you enter any
other thing, why you will enter it will continue q
...
It will

show you invalid choice, enter again okay
...


Coding Exercise for Beginners with
Solution | do-while loop in C++

we have discussed dou y u
...
The first program is what you
have to calculate sum of positive integers
...
If
you declare here not here then it will give error
number greater than equal to 0
...
Number is this point of prime number is minus
5
...
Number is now some garbage value and
when whenever you enter number one so garbage

Value Plus One it will give an unexpected result right so
what you can do to rescue from this situation to rescue
yourself from the situation we can initialize number
with zero at first
...
If
you press q small q or capital Q then it will quit and
then you 'll ask enter your choice suppose I am
entering 2
...
If I enter suppose h wrong choice try again and it
will show you the menu right
...
The Slime is just for decoration
purpose the Slime right like this you want to print
...
If choices quit
for quit choices are either you press small cure capital
Q right then it will print simply goodbye okay other
than these if you enter anything else simply do n't need
to write else
...
I hope you got
these two programs how to use do while loop while

writing programs and all and the next videos will show
how to write programs using do while loops
Title: C++ notes
Description: Full c++ notes beginner friendly