Programming Units

Ide

 integrated development environment

a sw which've a set of integrated tools for developing sw. the tools consists of coompliler editor & debugger etc

                                    IDE 4 C++:

borland 5.0

Ms visual studio

turbo 3.0

source prog(abc.cpp)    —save—->    disk —-compile—>   objject prog(abc.obj) —–linker —>executable —–run—->cpu

Compiler

A prog that traanslate all the sorce code of (hLL) of a prog nto obj code (MLL)

before execution. it actually have all the rule & reg of of sp lang & it check the source code…

Linker

 a program that links the compiled module (obj prg )& data files to create one executable program . it actually checks that will this sw run on this pc(hw & sw).

cpp.exe n borland = 16 bits

cpp32.exe n borland = 32 bits

16 bits mean that it would process 16 bit at a time

ASCII:::::::::american standard code 4 info interchange

1968, 128 standard , 128 extended ascii character

Tokens

tokens r the smallest word like unit recognized by a language , 6 types of tokens ,

1. key words

 : r the words reserved 4 sp purposes & it 's func s already defined in compiler, case sensitive , lower case , reserve words . c++ have 74 kw + 42 by borland so totall 116 n borland ……. the identification of kw s important cuz we have not to givethe   name of any kw to any identifier e,g if, switch, int, do, class, float, long, char , double, main , else , goto, while& return………………..

2. IDENTIFIER:

 r the arbitary names of any lenght given to vari(mem locations)  , user defined words

3. CONSTANTS::

: r the tokens representing a fix numeric (0-9) or char values(all ascii char)enclosed n singel quotes' '

4. STRING LITERALS:::

 any combination of ascii char enclosed n double quotes" "

5. OPERATORS:::

 r the tokens that trigger some computation when applied to var / const

6. SEPARATORS::

 r the symbols which separate two or more tokens e,g [], (), {}, ::, …, =, =/, space ……….

sample program:

1 . Identifiers

r the programmer supplied names also known as data names must 've a name , size , type, value

NAME:

length 'min=1 max=any borland can accept up to 250n char &visual up to 247

1st cahr must be a letter (a-z) / _

any vaid cahar (26 (a-z), 26 (A-Z), 10 (0-9), _ = 63characters toatal)

after 1st charu can have digits , alphabets , underscore

space isn't allowed

no sp cahr except _

Can't have the same name as C++ kw howevr an uppercase reserve word can be used as id but  it s considered a  bad programming practice.

the only char id must be an alphabet

it alwasy a good programming practice to choose such names which impart a meaning ful name e,g id  radius is more meaning ful than id r…….

TYPES OF IDENTIFIER:

VALUE & SIZE OF IDENTIFIER:

C++ PROG

Decleration Statement:

n which we identify & give names to var e,g  short integer=1;

Semantic Errrors:

meaning errors e,g f we assign a wrong vcalue to int/float etc. these errors r not detected by compiler but result will be effected e,g int x=3.5;

2. Constants:::

3 . String Literals

we can use escape sequence in sL e,g cout<<"hello
me";