What is Programming ?
We are representing C++ programming tutorials step by step basic to advance level. First we see a widely known definition of programming. ” A program is a precise sequence of steps to solve a particular problem. “
What Skills are needed to be a good programmer ?
- Paying attention to detail ( Read program )
- User interface should be friendly and understandable.
- You should need comment before start new code section
- Understand the programming facts
Lesson 1:
#include<iostream> using namespace std; main () { cout<<"Welcome to knowledge idea"; }
We will take this above code and understand them step by step.
#include : This is a pre processor directive. It is not a part of our program, it is an instruction that we giving to the compiler. The sign # is known as HASH and also called SHARP.
<iostream> : This is the name of library definition file for all input or output streams.
main() : main function will run first. main name is important in C.main name is run when your program is used. If you forget main function and mistype then C program will return you error.
{ } : Its a Curly brackets and also called braces. Keep remember every open braces must be matching close. Braces brackets allows to group together pieces of a program.
Cout : Cout is known as Output function in C. It takes data from your computer and send it on-screen as an output. Hence we use cout for output.
<<: This sign indicates the direction of data.
” ” : Everything which are in the double quotes is known as character strings. In C programming characters strings are written in double quotes.
Variables:
During Programming we need to store data. So this data store in variables. Variables data are storing in memory. Memory divided into blocks and viewed as a pigeon-holes. Avoid starting variables with underscore ( _ ). In C program every variable has a Name, Size, Type, Value.
Important Links:
Download Dev C++ ( Recommended C++ Editor )
Dev C++ Homepage