How to show output: Basic Syntax and Function: Lecture 1

C++ Output

How to Show Output And Basic Syntax and Function:

In C++ (C Plus Plus), we need to include C++ Libraries then we start body parts. If we need to describe user define functions then we'll describe that between head and body.
IOStream
This library is used for (Input & Output Stream). Because we may need to use many input-output built-in functions within body parts.
int main()
The main body starts here. You need to define your main executed code here.
Cout << "Welcome to Quality Written Codes.";
Cout is used for output the value.  We'll write output value within single or double quotes. It is like Echo Function in PHP
Note: Every line will be terminated with semi-colon ( ; ) is called "Terminator" as PHP
There are two ways to write comments within C++ Code.
#include <iostream> //C++ Library
#include <iostream> /*C++ Library */
  1. You can add comments with two slashes " // "
  2. You can also comment with "/* Quality Written Codes */" Asterisk Slash.
Note: These two methods are same as PHP comment system
Here you will know, How to pause system?
system("Pause");
You need to use this function, where you need to pause system.
Return 0;
It will null to 1st function or execute the function.


 /*  
  Name: Show Output.  
  Copyright: Sameearticles.blogspot.com  
  Author: Samee Ullah Feroz  
  Date: 26/01/14 23:03  
  Description: Here you will learn C++ basic syntax and function  
 */  
 #include <iostream>  // C++ Library
 int main()  
 { //body starts from here  
   using namespace std; //It will call all standard functions of C++ before body  
   cout << "Welcome to Quality Written Codes.";  
   cout << endl; //It is used to break line  
   cout << "\tSupported by Samee Ullah Feroz." << endl; //it is an other method to break line.  
   // "\t" is used to add tab like in PHP language.  
   system("pause"); //It will help to stop this program  
   return 0; // It will end this function.  
 } //body ends here  

Learn Its basics and ask the question about it.

Post a Comment

Give your reviews about this blog. Leave your comments. What do you think about this post?

Comments Guidelines:

1) I love to read comments, but please avoid spam.

2) Like this blog, share your insights, and spread the word.

3) You can use basic HTML/xHTML tags.

4) All comments are DoFollow—please use the section professionally.

5) Kindly mention your name or brand below your comment.

6) Constructive suggestions for improvement are always welcome.


Thanks for visiting Samee Articles.

========================================

Best Regards,

Samee U. Feroz

 
Copyright © 2011-2026. Samee Articles - All Rights Reserved
Proudly powered by Blogger