UrbanPro
true

Learn C++ Language from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

C++ Fundamentals - Introduction

R
Rakesh C.
18/05/2017 0 0

Introduction to C++

C++ CHARACTER SET

                       It is the set of all valid characters that a language can recognize . It represents any letter, digit, or any other sign .C++ character set:

LETTERS                          A to Z  and  a to z

DIGITS                                   0 -9

SPECIAL SYMBOLS          +  -* ^ \ []  {} = != < > . ‘ ‘ ;  :  &  #

WHITE SPACE                    Blank space , horizontal tab, carriage return , Newline, Form feed.

OTHER CHARACTERS     256 ASCII characters as data  or  as literals.

 

TOKENS:

The smallest  lexical unit in a program, it can be any keyword, identifier, literal, puncutator or operator.

 

KEYWORDS :  

The reserved words used by the compiler examples are: 

auto                continue        float                new                signed                        volatile

 short long                class               struct              else                              inline

delete             friend              private            typedef           void                             template

catch              friend              sizeof             union             register                       goto

 

IDENTIFIERS:

            An arbitrary name consisting of letters and digits and or underscore to identify a particular word. For example

            Pen     time580          s2e2r3               _dos            _HJI3_JK

 

LITERALS:

The data items which never changes its value throughout the program. Different types of literals are:

  • Character constant
  • Floating constant
  • String constant.

 

Integer constant :

Whole numbers without any fractional part. An integer constant must have at least one digit no decimal point. It may contain either  + or _. 

e.g   15,   1300,   -58795.

Character Constant:

            A character constant is single character which is enclosed within single quotation marks e.g.   ‘ A’ 

Floating constant:

            These numbers have the fractional part, may be positive or negative e.g     2.0, 17.5, -0.00256

String Literals:

            It is a sequence of letters surrounded by double quotes.  E.g  “abc”.

PUNCTUATORS:

            The characters that are used as punctuators in C++ are: [  ]    {   }     (   )    ,    ;   :   *    ………..   =    #

OPERATORS:

            Meant for computation when applied to variables and other objects and form mathematical expression. Following are some operators used in C++

Unary operators: Need only one operand e.g.  & , + , ++ , --  ! .

Binary operators: Require two operands to operate upon. Following are some of the Binary operators.

Arithmatic operators :

+                      Addition

_                      substraction

A*                    Multiplication

/                       Division

%                     Remainder.

 

Logical Operators :

 

&& -     logical AND                 || -       Logical OR

Relational Operator:

< Less than

> Greater than

<=  Less than equal to.

>= Greater than equal to.

==  Equal to.

!= Not equal to.

 

Conditional operator:                 ? (question )  :  ( colon )

 

Assignment Operator:

                                    =  assignment operator

                                    *= Assign Product.

                                    /= Assign quotient

                                    %= assign Remainder

                                    &= Assign bitwise AND

                                    ^= Assign bitwise XOR.

                                    |=Assign bitwise OR

 

 

0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You

Memory Layout of C Programs
A typical memory representation of C program consists of following sections. Text Segment: A text segment, also known as a code segment or simply as text, is one of the sections of a program in an object...

Array vs Linked List
Array Linked List Accessing element is easy. Accessing element is difficult compare to Array. Easy to use. Difficult to use. Memory is Fixed size. Memory is variable size. If...

C++ Program-Factorial
//Header files #include<iostream.h>#include<conio.h> //Main function void main(){ int num,i; long factorial=1; //Function for clearing screen clrscr(); cout<< "Enter a number:";...

Advantages of C++ Language
Advantages of C++ - C++ is a profoundly convenient dialect and is frequently the dialect of decision for multi-gadget, multi-stage application advancement. - C++ is a protest situated programming dialect...

Memory Layout in C++ vis-a-vis Polymorphism and Padding bits.
I know there is no need for the knowledge of memory layout for a normal day-to-day development of C++. However, when someone goes in the bit/byte level of C++, he needs to look for such discussion. To...

Looking for C++ Language Classes?

Learn from Best Tutors on UrbanPro.

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for C++ Language Classes?

The best tutors for C++ Language Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn C++ Language with the Best Tutors

The best Tutors for C++ Language Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more