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

Saturday, 26 March 2016

Hello World To C/C++

Credits: bioinfohub.com
C language is one of the most amazing things to happen on our planet easing many things in computer fields and giving us some of the most amazing OS like Microsoft. Many apps are now being based on this wonderful piece of language which dives very closely to the machine language amazingly being closed to High Level Language (HLL) which you and us can understand. A compiler is required to read your codes and join them together to create a masterpiece.

Why not you start to learn this language from the scratch and know the absolute beauty of it, so let's say Hello to C.

Wednesday, 24 February 2016

Stack

What is Stack ?
According to an English dictionary it means: 
A pile of objects, typically one that is neatly arranged.

Same is the case in Computer programming.


What Is Stack In Computer Science perspective?
Stack is an abstract data that contains set of elements, it follows two principles PUSH to add an element and POP to remove an element.

Operation Of Stack In Real Life:
Assume a box open from the top. We take some books and stack them one on the other inside the box until the box is having no space left. The closed end is your front end and opening is your rear end. Just as a cargo plane, you load things up in the rear of the plane. Got it? It is easy right? You just have to think of stacking in this box like you do in a cargo plane. 


Cockpit of cargo plane = Front end of box

Back door of cargo plane = Rear end of the box

Friday, 29 January 2016

What are Header Files?

When a C/C++ program is written, you write #include <stdio.h> or #include <iostream> at the top of program but have you ever wondered what are they. They are the Header Files, the first thing that you have to do in program is to understand the concept of these guys and you need to include these header files in the very first line of your program which appears like this: #include <header file>
Green line is a Header File