Skip to main content

Posts

C++ Variables, Literals and Constants

In this tutorial, we will learn about variables, literals, and constants in C ++ with the help of examples. C++ Variables In programming, a variable is a container (storage area) to hold data. To indicate the storage area, each variable should be given a unique name (identifier). For example, int age = 16 ;  Here, age  is a variable of the int  data type, and we have assigned an integer value 14 to it. Note: The int data type suggests that the variable can only hold integers. Similarly, we can use the double data type if we have to store decimals and exponentials. We will learn about all the data types in detail in the next tutorial. The value of a variable can be changed, hence the name variable int age = 14 ; age = 16; Rules for naming a variable :  A variable name can only have alphabets, numbers and the underscore _. A variable name cannot begin with a number. Variable names cannot begin with an uppercase character. A v...
Recent posts

Introduction

In this tutorial we will learn the base of the programming language. The famous C++ . what is c++ ? C ++ is a powerful general-purpose programming language. It can be used to develop operating systems, browsers, games, and so on. C ++ supports different ways of programming like procedural, object-oriented, functional, and so on.  This makes C ++ powerful as well as flexible. Our C ++ programming tutorial will guide you to learn C ++ programming one step at a time.