Introduction to C++ and Your First Program
Think about the digital notice boards you see outside schools, hospitals, or malls. They show messages like:
- “School Reopens on Monday”
- “Welcome to the Science Fair!”
- “Discounts Available in Store”
Someone, somewhere, typed these words into a system that teaches the board what to display.
That’s exactly what programming does.

And today, you’ll learn how to make the computer display your very first message in C++, one of the most powerful languages on Earth.
You’ll also create your first real mini-project: a Welcome Banner Program, something every device in the real world begins with.
My First C++ Welcome Banner
Imagine you're creating a small digital board system for your school. When the device turns on, it should display:
1 2 3 4============================== WELCOME TO MY C++ PROGRAM Learning Starts Here! ==============================
You’ll write this program in C++, run it, and see the output instantly using the DevsCall Online AI Code Runner, no installation needed.
What Is C++ and How Does It Work?
C++ is a programming language used to build:
- Games (Fortnite, Valorant engines)
- Smart devices and robots
- Banking and flight systems
- Browsers, operating systems, and simulations
Why do professionals rely on C++?
Because it’s fast, powerful, and extremely flexible.
How C++ Works?
When you write code, you are giving the computer instructions. But the computer only understands machine language (0s and 1s). So we need something that translates C++ into machine instructions.
That “translator” is called a compiler.
But don’t worry, using DevsCall’s AI coding environment, you don’t have to install anything. You write your C++ code, press Run, and see the output instantly.
Let’s Build the Welcome Banner
Here is the complete C++ program:
1 2 3 4 5 6 7 8 9 10 11#include <iostream> using namespace std; int main() { cout << "==============================" << endl; cout << " WELCOME TO MY C++ PROGRAM" << endl; cout << " Learning Starts Here!" << endl; cout << "==============================" << endl; return 0; }
When you run this program, it prints the welcome banner exactly as shown.
You can try this right now inside the DevsCall AI Code Runner, just paste the code, ask AI to explain it, or modify it live.
How It Works
Let’s break the magic into simple pieces:
- #include <iostream>
This tells C++ we want to use input/output tools (like printing text). - using namespace std;
Makes writing code easier so we can use cout directly. - int main()
This is where every C++ program starts, the main entry point. - cout << "text"
Prints text on the screen. - return 0;
Tells the computer the program ended successfully.
That’s it! You just wrote and understood your first C++ program.
Learn Together with AI
You can learn faster by asking AI exactly what you want.
Try this prompt:
“Write a simple C++ program that prints a welcome banner. Explain each line in beginner-friendly language.”
Then try experimenting:
- Ask it to print your name.
- Ask it to add a new message line.
- Ask it to show today’s date.
- Ask it to frame the banner with stars instead of equal signs.
You don’t need any IDE installed, just use DevsCall’s online AI-based code tester, paste your code, and watch it run with explanations.
Practice Challenge
Your turn now!
Write a C++ program that prints this exact output:
1 2 3 4============================= C++ INTRO PROGRAM Hello from DevsCall! =============================
Use cout statements for each line, and keep everything inside main().
If you want help, simply ask your AI Copilot:
“Explain how to print multiple lines in C++ using cout.”
Once you’re done, you can paste your code into DevsCall’s AI Runner and see it come to life.
Coming Up Next
Now that you can make C++ display messages, it’s time to give your programs the ability to think.
In the next lesson, you’ll learn about variables, how computers store information, remember values, and work with data just like real apps do.
Frequently Asked Questions
You’ll learn what C++ is, how programs work, how to write your first “Hello World” program, and how to run C++ code using DevsCall’s online AI environment.
No. You can write and run all C++ programs directly in DevsCall’s online AI-based code runner—no installation required.
Not when taught step-by-step. This course is designed for absolute beginners (Grades 8–12) and uses real-world examples to make learning easy.
Yes! You can ask the AI tutor to explain code, fix errors, or generate examples. It’s like having a personal programming coach.
A compiler translates your C++ code into machine language the computer can understand. Without it, programs cannot run.
Still have questions?Contact our support team