-->

WAP to understand white space

//program to understand white space
#include <iostream>                 //header file
#include<stdlib.h>                  //header file
using namespace std;
int main()                          //main function
{
    cout << "Hello C++!" << endl;// string print with space called white space. It also can be tab/line feed
                                    //vertical tab or formfeeds etc.
    return 0;                       // returns 0 after execution
}

WAP to understand escape sequence.

//PROGRAM TO understand escape sequence

#include <iostream>//header file

using namespace std;//to handle all standard characters/functions,reserved words  used in program. we do not use in turboc++ compiler.

int main()          //main function
{
    cout << "first line"<<"\n";//escape sequence for new line
    cout<<"second line"<<"\n";//escape sequence for new line. we can also use single quote. It works.
    return 0;
}

WAP to understand endl manipulator

// program to understand endl manipulator
#include <iostream>  //header file
using namespace std; //to handle all standard characters/functions,reserved words  used in program. we do not use in turboc++ compiler

int main()
{
    cout<<"first line"<<endl;// cout is an object and is pre-defined. It is responsible for output stream.
                             // endl is used to feed a line in stream and is called manipulator. It works in same manner as \n does in program.
                            // we can put \n in single quote or double quote.
    cout << "second line\n";
    cout<<"third line"<<"\n"<<"or"<<endl;
    cout<<"fourth line"<<'\n';
    return 0;
}

c++ to print hello world

//program to print hello world    //comment line
#include <iostream>              // header file to handle input and output
#include<stdlib.h>               // header file to handle system(cls).
using namespace std;             //to handle all standard characters/functions,reserved words  used in program. we do not use in turboc++ compiler
int main()                       // main function as starting point of execution
{
    cout<<"firstline"<<endl;
    system("cls");                 //clears the screen
    cout << "Hello world!" << endl;// cout is an object and is pre-defined. It is responsible for output     // stream. endl is to end the line.
                                   //<< is called insertion operator or put -to operator.
    return 0;                       // the string inside double quote is string constant. Here it is "hello world".
}

c++ basic programs

We have following basic programs.
----------------------------------------------------------------------------------------
1)wap to print hello world.
                                                                                                 solution

2)WAP to understand endl.

                                                                                                solution

3)WAP to understand escape sequence.

                                                                                               solution

4)WAP to understand white space.

                                                                                              solution

5)WAP to use header file with double quote.

                                                                                                    solution

6)WAP to input.
                                                                                               solution

7)WAP to input using cin.

                                                                                                 solution

8)WAp to input string .

                                                                                                     solution

9)WAP to print multiple string using single cout.

                                                                                                solution

10)WAP to understand character variable and constant.

                                                                                                     solution

11)WAP to understand definition of variables.

                                                                                                   solution

12)WAP to print character constant.

                                                                                                solution

13)WAP to understand setw() function.

                                                                                               solution

14)WAP to understand library function.
     
                                                                                                solution

15)WAP to understand type casting.

                                                                                                solution

16)WAP to understand assignment operator.

                                                                                                 solution

17)WAP to understand const identifier.

                                                                                               solution

18)WAP to understand define directive or symbolic constant.

                                                                                                solution

19)WAP to understand arithmetic remainder operator.

                                                                                                solution

20)WAP to understand unary operator(prefix and postfix).

                                                                                                solution

21)WAP to generate given table using single cout.

                                                                                                solution

22)Program to generate given output.

                                                                                              solution

23)WAP to understand relational operator.

                                                                                              solution

24)WAP to understand logical operator.

                                                                                            solution

25)WAP to understand conditional operator.

                                                                                            solution

26)WAP to clear the screen using system(cls).

                                                                                            solution

27)WAP to add two numbers without using namespace.

                                                                                            solution

28)WAP to print hello world without namespace.

                                                                                            solution


-----------------------------------------------------------------------------------------
If you find broken link, please let me know.

C++ programs examples

------------------------------------------------------------------------------------------------
click the unit you want to know/understand.
--------------------------------------------------------------------------------------

                        It contains basic fundamental of C++ programs. Like, inputs outputs,operators,strings etc.


                                                 It contains programs related to conditions and decisions. Like if program, if..else program,if..else if program,switch program ,break and continue program. 


3. Loop related programs(loop , nested loop):- 
                                       It contains programs using while, or for or do..while loop. It is used to solve complex problem in very say way. We can use any loop to solve any program.


4. Array related programs:-
                                     It contains program using one and multidimensional array. Array is used to use as pointer. It is helpful when we write a program for multiple data using same variable.

5.Array with string programs
                                   If we want to to write program for strings. then either we can use directly string or  we can use array with string.It contains programs related to string processing (with/out library)


6.Function related programs:
                                      We can understand what is function and how to use it. It is helpful to solve complex program in divide and conquer process.It contains programs using user defined function. Click the above link to know more.

7.struct,typedef and union related program : 
                                     This section contains programs using struct, union and typedef . We can be clear about what is struct,union and typedef through examples.

Pointer programs: 
                                 When we write program by using memory directly, then pointer is helpful. It also becomes faster. Here we can get programs related to pointer, array as pointer, pointer as an array, pointer in function, call by value and call by reference. We can also use pointer for strings.

Data file handling related program:
                                      It contains programs using file handling functions etc. If we want our data permanent then we have no option than this.It makes our entered data permanent on hard disk. 

------------------------------------------------------------------------------------------------------------------
Now we are gonna talk about object Oriented program in detail.

1. Object and class program


2.

friends contact management project in c

-----------------------------------------------------------------------
About the project:
          This mini project is about friends contact. It is a mini project developed in C. Here , we can add,view,search and edit contacts of friends.
Here is screen shot of project.



Youtube link: If you want to know more about this click here for youtube video.