C++ Online Compiler
Example: Hello World Program in C++ Using Character Array
C
C++
C#
Java
Python
PHP
main.cpp
STDIN
Run
// HELLO WORLD PROGRAM IN C++ USING CHARACTER ARRAY #include <iostream> using namespace std; // It's the main function of the program int main() { // Step-1 Create an array to store the message char message[] = "HELLO, WORLD!"; // Step-2 Display a label cout << "C++ HELLO WORLD PROGRAM" << endl; // Step-3 Print the message using array cout << message << endl; return 0; }
Output
Clear
ADVERTISEMENTS