Skip to main content

An Example of C++ Program


Structure of program


/*This Program prints Hello World on screen*/

#include <iostream.h>

using namespace std;

int main()

{

count << "Hello World";

return 0;

1 . /* This program ... */

The symbols/* and*/ used for comment. This Comments are ignored by the compiler, and are used to provide useful information about program to humans who use it.


2. #include <iostream.h>

This is a preprocessor command which tells compiler to include iostream.h file.


3. using namespace std; 

All the elements of the standard C++ library are declared within what is called a namespace, the namespace with the name std. So in order to access its functionality we declare with this expression that we will be using these entities. This line is very frequent in C++ programs that use the standard library.


4. main()

C++ programs consist of one or more functions. There must be one and only one function called main. The brackets following the word main indicate that it is a function and not a variable.


5. { }

braces surround the body of the function, which may have one or more instructions/statements.


6. Cout<<

it is a library function that is used to print data on the user screen.


7. ''Hello World'' is a string that will be displayed on user screen 


8. ; a semicolon ends a statement.


9. return 0; return the value zero to the Operating system. 




Comments

Popular posts from this blog

How To install Kali Linux (nethunter) On Android (Without root) via proot-distro and install Kali Linux Xfce Desktop On Android using Termux

What is kali linux? Kali Linux is a Debian-derived Linux distribution designed for digital forensics and penetration testing. It is maintained and funded by Offensive Security , This tutorial isn't only about learning how to install Kali Linux. Okay let's run down what we will be doing                        Table Of Content •Installing Kali Linux Terminal •Installing Kali Linux Desktop •Installing Default packages  •Creating vncserver port •Closing vncserver port •Closing multiple vncserver ports  •Reseting Kali Linux •Uninstalling Kali Linux  Okay!!!! Let's Begin Requirements: • Termux  : Click Here To Download Termux   Installation:   Please you can also copy and paste the commands below    The First thing we have to do is to make sure our repositories are up to date, to do that type the command  pkg update   It is essent...

How To Create a Strong Virus And A Payload with Python 2023

Let’s start by saying that viruses are a little bit anachronistic in 2023… nowadays other kinds of  malware (like worms for example:) are far more common than viruses. Moreover, modern operative systems are more secure and less prone to be infected than MS-DOS or Windows 95 were (sorry Microsoft…) and people are more aware of the risk of malware in general. Moreover, to write a computer virus, probably Python is not the best choice at all. It’s an interpreted language and so it needs an interpreter to be executed. Yes, you can embed an interpreter to your virus but your resulting virus will be heavier and a little clunky… let’s be clear, to write a virus probably other languages that can work to a lower level and that can be compiled are probably a better choice and that’s why in the old days it was very common to see viruses written in C or Assembly. That said, it is still possible to write computer viruses in Python, and in this article, you will have a practical demonstration. T...

How To install Windows 10 in Termux(Without rooting your Android phone)

   Hello guys what's up, Today we are going to see how easily we can run Windows 10 Operating System on Android Phone just by running few commands on Termux and if you will like this post I will also show you how to run the Windows 8.1 and Kali Linux GUI(Without root) on Android using Termux only in an upcoming post so just comment down below if you are interested. This method is quite interesting as this will make you understand how powerful a Linux terminal can be so without wasting any more time let’s start this tutorial. Below you will find all the resources you need and their download links so Download all the files, install, and copy it to your smartphone's Internal or External Storage. Requirements: •ZArchiver : Click Here To Download ZArchiver • Termux  : Click Here To Download Termux • AVNC :  Click Here To Download AVNC • Windows 10 : Click Here To Download The Windows 10 File After download the windows 10 file you need to Install termux and AVNC server...