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

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...

Copy-on-Write
Note: You can read the original write-up at http://som-itsolutions.blogspot.in/2017/01/copy-on-write.html As i was trying to recapitulate several important concepts of OOAD, naturally COW or Copy-On-Write...

Difference Of Inheritance In C++ And Java
In Java , multiple inheritance is not applicable directly but we can implement the concept by using the interfaces. In c++ and Java, the common types of inheritances are: Single Multi level Hybrid Hierarchical

C++ Program Sample Application
//Standard Library Functions(Headers Files Used in C++) #include<iostream.h> #include<conio.h> //Main function int main() { //function for clearing the screen clrscr(); //function for...

File Handling in C++ : Lesson 1 Data Persistence
Data persistence refers to the existence of data in the program. In other words, it means the life of data. Data is the most significant part of a program and it must be stored properly and easily retrieved...
J

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