HelloWorld in C++


Q. Write a simple C++ program for "hello world".

 #include <iostream>    
using namespace std;
  
int main()
{           
	cout <<	" Welcome to Onlinetpoint"; // you can write "Hello World!" 
    return 0;    
} 

Q. Write an algorithm to simple C++ program for "hello world".

Step 1. Start the program.
Step 2. Include the necessary library for input-output operations.
Step 3. Use the standard namespace to avoid prefixing names with `std::`.
Step 4. Define the `main` function which serves as the entry point of the program.
Step 5. Inside the `main` function, output the string `"Welcome to Onlinetpoint"` to the standard output (console).
Step 6. Return 0 from the `main` function to indicate that the program ended successfully.
Step 7. End the program.



OnlineTpoint is a website that is meant to offer basic knowledge, practice and learning materials. Though all the examples have been tested and verified, we cannot ensure the correctness or completeness of all the information on our website. All contents published on this website are subject to copyright and are owned by OnlineTpoint. By using this website, you agree that you have read and understood our Terms of Use, Cookie Policy and Privacy Policy.