Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views4 pages

C++ Notes 1

C++ is an object-oriented programming language developed by Bjarne Stroustrup in the early 1990s, derived from C and Simula 67. It uses a character set that includes letters, digits, special symbols, and whitespace, and consists of tokens such as keywords, identifiers, literals, punctuators, and operators. The language supports various data types, including fundamental, derived, and operators, which are essential for performing operations in programming.

Uploaded by

prithvi70042
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

C++ Notes 1

C++ is an object-oriented programming language developed by Bjarne Stroustrup in the early 1990s, derived from C and Simula 67. It uses a character set that includes letters, digits, special symbols, and whitespace, and consists of tokens such as keywords, identifiers, literals, punctuators, and operators. The language supports various data types, including fundamental, derived, and operators, which are essential for performing operations in programming.

Uploaded by

prithvi70042
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

C++

> C++ is a object oriented programming language/system.

> C++ was developed by "Bjarne stroustrup" at "AT & T Bell lab (early 1993).

> It is taken from "C language" & "Simula 67.

> Its early name was "c with class".

> The name C++ was coined by "Risk Mascitti" (early 1983).

Character set

Character set means which character is used in writing programming in C++.

EX:-

Letter (A-Z):- Upper case (a-z):- Lower case Digits:- (0-9)

Special symbol:- #, *,(), {}, <>, +, =, etc

White Space:- \a, \t, \n etc.

ASCII = American standard code for information Interchange.

Tokens

The smallest individual unit in programs referred as tokens.

Or

The smallest unit can be identified by the programming language. The basic types of tokens:-

i. Keyword

ii. Identifiers

iii. Literals/ Data type/ constant.

iv. Punctuators/ seperators/ special symbol.

v. Operator.

Keyword

keyword are the word having find meaning which are already explained to compiler of C++.

> It is reserved for instruction only.


> All keywords are written in lower case letter.

Some examples of keywords:-

Int, float/, void, char, double, long, if, else, switch, case, break, loop, do, while, continue, etc.

Identifier

A name of variables, array, object and class etc, created by programs i.e. user.

> It consists of letters, digits and underscore.

> It is case sensitive means upper case letter and lower case letters.

> The first character must be letter or underscore. The underscore (-) counts as a letter.

> We cannot use keywords as identifier.

Variable

> It is a name of memory location.

> It is used to store the data.

> Its value can be changed and it can be reused many times.

Data type

Data type is a way to identify type of data and associated operation which can perform on the
data.

Or

Data type is used to declare/defined a variable it specified the data store format of the variable. The

various category of Data type:-

1. Fundamental /Atomic /Primary (built in) data type.

• Integer

• Char

• Float

• Double

Void
2. derived data type:-

• Array.

• Function.

• Pointer.

• Structure.

• Union.

• String.

Operators

An operator is a symbol that tells the computer to perform certain mathematic, logical and
manipulation.

There are two basic types of operator:-

i. Unary operator.

ii. Binary operator

1 unary operator:-

Unary operators are those operator that require one operand to operate upon.

> Increment (++) / decrement (--) operator

Increment operator

;---------------1;
Prefix increment ++a postfix increment a++

First increase the value first assign then increase

the value by 1.
by 1 then assign.
a=4-0-11
a=4O11
b=a++
b=++a
b= 10
b= 11
a= 11
a= 11
I
Decrement operator

I
Prefix decrement

first decrease the value


post decrement
by 1 then assign. a=W9
first assign value then
b= - -a
Decrease the value by 1
b= 9
a= 4-0-9
a= 9
b=a--

b= 10

a= 9

You might also like