Basic Program in C++

Basic Program in C++

Write a program to print a message on the screen?

Program with comments.

We can comment the program for better understanding. Comments can be started with the symbols //.

Output.

basic program in c plus plus


Write a program to print two messages on two different lines on the screen?

Program with comments.

Output of the program.

first program in c++

Video Lecture

10 thoughts on “Basic Program in C++

  • April 17, 2019 at 8:54 pm
    Permalink

    This is the basic program according to this program when we have to print the same text as it is we use double quotation marks in cout statement so it prints the same we entered in double quotation

  • April 16, 2019 at 2:44 pm
    Permalink

    thanks, sir, through this tutorial, we know how to print a message in a program in one line and two different lines…if we print two messages we use line break statement endl…

  • April 16, 2019 at 2:10 pm
    Permalink

    in this program, we display a message on the screen in one line.in the program, we display the message on the screen in two different lines by using endl keyword through which the control is shifted to the next line

  • April 15, 2019 at 7:31 pm
    Permalink

    It’s motivating for beginners to take start from a basic program where they could understand better the usage of basic statements, components of a language and the purpose of the program.
    In the first program, messages are printed in series as one after another in a line while the second program is printing both messages in each line using break line statement “endl;”.

  • April 15, 2019 at 7:00 pm
    Permalink

    In this program, there is a header file. then we are using namespace std; int main function of the program. Every program have a main function .cout use to display a message
    Like well come, students,/enter no etc.endl use to move next line

  • April 15, 2019 at 6:41 pm
    Permalink

    This two program is very helpful for the beginners. In the first program, we display the message in one line on the screen. In the second program, we display the message on the screen in two different lines by using (endl) keyword.

  • April 15, 2019 at 6:09 pm
    Permalink

    The first program shows that the output will be printed on a single line.
    The second program shows that we can print a message on two different lines by using (endl) keyword

  • April 15, 2019 at 5:52 pm
    Permalink

    This is the basic program towards learning of any programming language in which we print our text same as it is…When we compiled and run our program the text written in “quotation marks will print the same as it is…

  • April 15, 2019 at 5:51 pm
    Permalink

    This is the basic program towards learning of any programming language in which we print our text same as it is…When we compiled and run our program the text written in “” quotation marks will print the same as it is.

  • April 13, 2019 at 4:37 pm
    Permalink

    Thank you t4tutorials for sharing such a nice two programs. In the first program, we display a message on the screen in one line.
    In the second program, we display the message on the screen in two different lines by using (endl) keyword through which the control is shifted to the next line.

Leave a Reply

Your email address will not be published. Required fields are marked *