cpp introduction

 

Learn c++ Programming


Our c++ tutorials will guide you to learn C++ programming one step at a time.




C++ Programming Tutorial

Introduction

C++ is a middle-level programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs. C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. This C++ tutorial adopts a simple and practical approach to describe the concepts of C++ for beginners to advanced software engineers.

Program to Display "Hello, World!"

#include <iostream>
                  int main() {
                     // cout<< displays the string inside quotation
                     cout<<"Hello, World!";
                     return 0;
                  }
                  
Output

 Hello, World!





How "Hello, World!" program works?

  • The #include is a preprocessor command that tells the compiler to include the contents of iostream (input output stream) file in the program.
  • The iostream file contains functions such as cin>> and cout<< to take input and display output respectively.
  • If you use the cout<< function without writing #include <iostream>, the program will not compile.
  • The execution of a C program starts from the main() function.
  • cout<< is a library function to send formatted output to the screen. In this program, cout<< displays Hello, World! text on the screen.
  • The return 0; statement is the "Exit status" of the program. In simple terms, the program ends with this statement.

About C++ Programming

  • Multi-paradigm Language - C++ supports at least seven different styles of programming. Developers can choose any of the styles.
  • General Purpose Language - You can use C++ to develop games, desktop apps, operating systems, and so on.
  • Speed - Like C programming, the performance of optimized C++ code is exceptional.
  • Object-oriented - C++ allows you to divide complex problems into smaller sets by using objects.

Why Learn C++ Programming?

  • C++ is used to develop games, desktop apps, operating systems, browsers, and so on because of its performance.
  • After learning C++, it will be much easier to learn other programming languages like Java, Python, etc.
  • C++ helps you to understand the internal architecture of a computer, how computer stores and retrieves information.

Why Use C++


One of the most widely used programming languages worldwide is C++.

Operating systems, graphical user interfaces, and embedded systems all use C++ today.

Programming in C++, an object-oriented language, offers applications a distinct structure and encourages code reuse, which reduces development costs.

Applications that can be converted to different platforms can be created using C++ because it is portable.

Fun and simple to learn, C++!

Because C++ is close to C, C#, and Java, programmers can easily convert from C to C++ or vice versa.


Post a Comment

Previous Post Next Post