Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

C++ complete guide

Rating
-
Sold
-
Pages
1
Uploaded on
15-03-2023
Written in
2022/2023

If u need a full depth knowledge of c++ plz do use this notes

Institution
Course

Content preview

c plus plus is a popular programming language introduced by john strawstrom in the year 1979. It
is general purpose case sensitive language and it is called pre-compiled language. It contains
both features of high level and low level language. C plus plus supports procedural programming
and functional programming as well. There are different types of data type that acts as a
keyword which is responsible to define a variable. The syntax of strings contains a collection of
characters surrounded by double quotes for example here string is the type str is the name of
the string and coffee is the value that is assigned to the string. For loop for loop is the repetition
control structure that allows us to repeat a block of code for a fixed number of times instead of
repeating the same code again and again. Another type of loop is while loop while loop are used
in c plus are group of statements that are designed to perform a specific task. functions in c and
c plus allow us to write a code inside the function and then we can use that code every time
when we need it by mocking the function.
We have to use if condition because we want to find the even elements and the odd elements
and for that we have to include if condition so we 'll write if array of i mod 2 that is if an element
on dividing by 2 gives 0 as a remainder then it will it is even element so we'll increment the even
variable this which we have written 0 will increment over here okay so in this question we have
used array for loop and if else so now let 's try some other example. We will print the elements
from 1 to 20 using while loop and with the help of function so first of all we 'll start with
intermittent and inside int main will simply call or invoke the function by writing the name of the
function print function. In order to give some space between each element while printing we
have used double quotes with the space between them. Get line c in is used to take the input of
a string and s is the name of the string. Now we will print another message saying that you have
entered now here we'll print the string so next line and then okay now we 'll do some operations
like s dot pushback this will add an element at the end of the. string. There are some more
examples on each of these topics we have covered.

Written for

Institution
Course

Document information

Uploaded on
March 15, 2023
Number of pages
1
Written in
2022/2023
Type
Class notes
Professor(s)
Dellibabu
Contains
All classes

Subjects

$9.89
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
chandresh

Get to know the seller

Seller avatar
chandresh
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions