Skip to content
  • Linkedin
  • Youtube
  • Pinterest
  • Home
  • Privacy Policy
  • About
  • Contact
Programmingoneonone

Programmingoneonone

Programmingoneonone is a website that publishes daily tutorials, methods, guides, and articles on IT, Education, and technology.

  • Home
  • Human Values
  • DSA
  • IoT Tutorials
  • Interview Questions and Answers
  • Toggle search form
basic of c++ programming language

Basics of C++ Programming Language

Posted on 27 April 20214 May 2023 By YASH PAL 1 Comment on Basics of C++ Programming Language

If you are a developer and mainly code in the C++ programming language then you should need to learn about the basic concepts that are going to help you to enhance your coding skills. so in this tutorial, we are going to learn about the basics concepts of the C++ programming language.

What is C++ programming language?

C++ is a programming language that was developed by Bjarne Stroustrup to create high-performance applications. it is a high-level programming language that was first introduced in 1998 as an extension of c programming language. also, it is a cross-platform language that gives us control over the system resources and memory used by the system. let’s take a look at the versions of the C++ programming language.

VersionsStandardRelease Date
C++98ISO/IEC 14882:19981998-09-01
C++03ISO/IEC 14882:20032003-10-16
C++11ISO/IEC 14882:20112011-09-01
C++14ISO/IEC 14882:20142014-12-15
C++17TBC2017-01-01
C++20TBC2020-01-01
C++ versions with date

Basics concepts of C++ programming

If you want to start with the C++ programming language then you should have at least knowledge of basic concepts that are used in C++ programming language.

  • #include – used for including a header file or source file in the program.
  • <iostream> – used to define the standard stream objects or functions that are used to take input and print output on the screen.
  • <cstdlib> – used to define the general-purpose functions that can help us to manage memory, allocation of memory, and generation of random numbers.
  • <ctime> – used to manipulate the date and time information from the system to the program.
  • std – used to declare the C++ standard library features.
  • cin – used to read the input from the input device.
  • cout – used to write the output on the screen.
  • endl – used to write output on the new line.
  • argument – it is also known as a parameter and used to pass the information to the function.
  • break – used to exit from a loop or a statement like from switch, while, for, or do-while loop.
  • continue – used to skip the line from execution.
  • const – used to define a constant object.
  • heap – used for dynamic memory allocation.
  • exception – It is an error that occurs anomaly in the program.
  • <fstream> – It is a class of input/output stream to operate files.
  • integer – whole number from 0-9 and its combinations.
  • float numbers – a real number like 1.2
  • string – a sequence of characters.
  • character – a single character or symbol.
  • Boolean – It returns either a false or true value.
  • int – keyword used to declare the integer variable.
  • signed – By default all the variables in C++ programming are signed. and it is used to hold negative and positive values.
  • unsigned – It can hold only positive (+ve) values.
  • float – keyword used to declare the floating variable.
  • char – keyword used to declare a character variable.
  • bool – keyword used to declare the boolean variable.
  • array – It is a type of data structure that holds a sequence of values of the same type.
  • pointer – used to store the address of an object.
  • NULL – It is a constant that denotes the value 0.
  • sizeof – used to find the size of an object in bytes.
  • void – it does not have any value.

Oops concepts in C++ programming

  • Instance – In C++ programming, each object is called an instance of a class.
  • Class – Class is a blueprint or combination of objects that contain variables, methods, and functions for performing a task.
  • encapsulation – it is a technique of packing data and functions into a single component.
  • inheritance – it is the process of accessing methods and members of one class into another class.
  • polymorphism – It means that if we call a member function then a different function is executed depending on the type of object that invokes the functions. means we can create more than one function with the same name and can call them for different work.
  • virtual function – it is a function or method whose behavior can be overridden within an inheriting class by a function with the same signature.
  • abstract class – It is a class that has pure virtual functions. means the functions can only have declarations without the body. and an abstract class can only be a base class for other classes.

Basic C++ Program

#include <iostream>
int main()
{
 std::cout << "Hello World!" << std::endl;
}

Explanation

#include <iostream> – It is a directive that is used to include the header file iostream. so we can use the functions that are defined in the iostream file.

iostream – It is a C++ standard library header file that contains input and output functions. and these functions provide a way to get input from and output to an external system.

int main() – This is a function named main. in a C++ program, there must be only one main function and it must always return a number of the int type. and the main function is called upon the execution of the program.

{ } – These are the curly brackets in which we can define the body of the program. from the { open curly bracket the compiler starts compiling the program and at } close curly bracket the program stops executing by the compiler. just like in the above program we are printing the Hello World! message on the screen.

std – it is a namespace and :: is the scope resolution operator that allows for an object by the name within a namespace.

std::count – it is the standard output stream object that is used to print the output on the screen and defined in the iostream file.

std::endl – it is a special input-output stream object that is also defined in the iostream file that is used to insert the end of the line to the string.

Keywords in C++ programming language

alignasstructnew
deleteand_eqthis
not_eqdynamic_castbitand
trueorexplicit
breaktypeidprotected
falsecharunsigned
usingfriendclass
voidsignedinline
constexprwhilestatic_assert
mutabledecltypealignof
switchnoexceptdo
asmthread_localnullptr
elsebitortry
or_eqexportcase
typenamepublicfloat
char16_tchar32_treturn
gotocomplvolatile
sizeofintconst_cast
xorstatic_castnamespace
defaultandtemplate
notdoubleauto
throwoperatorenum
booltypedefprivate
externcatchunion
registerforreinterpret_cast
virtualshortif
constwchar_tstatic
longcontinuexor_eq
Basic Programming, C++ Tutorials, Programming Tutorials Tags:Basic Programming, computer science, cpp

Post navigation

Previous Post: Structure of EMail
Next Post: What is Object Oriented Programming

Related Tutorials

basic structure of c program Basic Structure of C Program C Programming Tutorials
Introduction to c programming Introduction to C Programming Language C Programming Tutorials
basic of c programming Basics of C Programming C Programming Tutorials
object oriented programming What is Object Oriented Programming Basic Programming
basic network structure and it's components with types Basic Network Structure and Components Computer Networks Tutorials
introduction to microsoft frontpage MICROSOFT FRONTPAGE Basic Programming

Comment (1) on “Basics of C++ Programming Language”

  1. C++ Application Development Services says:
    4 May 2023 at 1:24 AM

    My partner and I stumbled over here coming from a different web page and thought I should
    check things out. I like what I see so now i am following you.
    Look forward to going over your web page repeatedly.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Pick your Subject

  • Internet of Things
  • Data Structures/Algorithms
  • Interview Preparation
  • Human Values
  • Java Interview Questions and Answers (2023)
    Thinking of becoming a Java developer? I must say it’s a good choice! Java is continuously named the most popular programming language. And the...

    Learn More “Java Interview Questions and Answers (2023)” »

  • Iot(Internet of things) in healthcare
    IoT in Healthcare
    IoMT (Internet of Medical Things) stands for devices that can collect and exchange data – either with users or other devices via the internet,...

    Learn More “IoT in Healthcare” »

  • four stages of iot solution for industry
    IoT for Industry
    In this post, we are going to learn about use cases of IoT for Industry and four stages for providing IoT solutions. Machine Diagnosis...

    Learn More “IoT for Industry” »

  • Iot for agricultural
    IoT in Agriculture
    IoT technology has realized smart wearables, connected devices, automated machines, and driverless cars. However, in agriculture, the IoT has brought the greatest impact. Amongst the challenges...

    Learn More “IoT in Agriculture” »

  • Iot for logistics
    IoT in Logistics and Supply Chain
    IoT applications for smart logistics and supply chain systems:  Logistics Fleet Tracking  To track the locations of the vehicles in real time, the vehicle...

    Learn More “IoT in Logistics and Supply Chain” »

  • Algorithms Tutorials
  • Basic Programming
  • C Programming Tutorials
  • C++ Tutorials
  • Compiler Design Tutorials
  • Computer Networks Tutorials
  • Computer Organization Tutorials
  • Computer Science Tutorials
  • Data Structures Tutorials
  • DBMS Tutorials
  • Developer Guide
  • Digital Communication
  • Digital Logic Tutorials
  • Internet of Things Tutorials
  • Internet Tutorials
  • Interview questions answers
  • Java Tutorials
  • Javascript Tutorials
  • Machine Learning Tutorials
  • Operating Systems Tutorials
  • Programming Tutorials
  • Projects
  • Tips&Tricks
  • Tools
  • VBScript Tutorials
  • Java Interview Questions and Answers (2023)
    Thinking of becoming a Java developer? I must say it’s a good choice! Java is continuously named the most popular programming language. And the...

    Learn More “Java Interview Questions and Answers (2023)” »

  • Iot(Internet of things) in healthcare
    IoT in Healthcare
    IoMT (Internet of Medical Things) stands for devices that can collect and exchange data – either with users or other devices via the internet,...

    Learn More “IoT in Healthcare” »

  • four stages of iot solution for industry
    IoT for Industry
    In this post, we are going to learn about use cases of IoT for Industry and four stages for providing IoT solutions. Machine Diagnosis...

    Learn More “IoT for Industry” »

  • Iot for agricultural
    IoT in Agriculture
    IoT technology has realized smart wearables, connected devices, automated machines, and driverless cars. However, in agriculture, the IoT has brought the greatest impact. Amongst the challenges...

    Learn More “IoT in Agriculture” »

  • Iot for logistics
    IoT in Logistics and Supply Chain
    IoT applications for smart logistics and supply chain systems:  Logistics Fleet Tracking  To track the locations of the vehicles in real time, the vehicle...

    Learn More “IoT in Logistics and Supply Chain” »

Copyright © 2023 Programmingoneonone.

Powered by PressBook Blog WordPress theme