Tuesday, 7 June 2016

Introduction to Loops


Introduction:


Loop is basically a continues repetition of something , they are very important part of programming to be a good programmer one must have a good grip on loop logic building.So to develop and enhance the logic building of loop one must practice on patterns.

There are Three Types of loops:
1) For Loop
2) While
3) Do-While

1)For loop:

For loop loops are finite loop limits are defined in it.

Syntax:

1
2
3
4
for(int i=0/*from where the loop should start*/;i<10/*condition for the loop loop will keep on running until this condition satisifies*/;i++/*how much loop should increment value well in this case there is an increment if one but it can be two three and so on.*/)
{
//body of loop( what you want to to inside loop)
}

Monday, 6 June 2016

Escape Sequences and ASCII Values


Escape Sequences:

Escape Sequence
Description
\n
New Line
\t
Horizontal Tab (Print 8 spaces)
\b
Back space
\f
New Page (Form feed)
\a
Audible Bell
\r
Carriage Returns (Bring The Positon of Cursor to initial Position)
\v
Vertical Tab
\\
Prints Slash