Skip to content

Tag Archives: cpp-data-types

When we initialize a value by putting ‘0’ before a number, the number is treated as octal. For instance ’10’ is read as 10 but… Read More
Any datatype is used to store any type of value in a variable. Scripting languages like JavaScript, TypeScript provides any datatype functionality. C++ also provides… Read More
Uniform initialization is a feature in C++ 11 that allows the usage of a consistent syntax to initialize variables and objects ranging from primitive type… Read More
C++ program for printing the range data type like int, char, short. Signed Data Types METHOD 1.) calculate total number of bits by multiplying sizeof… Read More
In this article, we will look at what happened when we exceed the valid range of built-in data types in C++ with some examples. Example… Read More
In C and C++, there are four different data type available for holding the integers i.e., short, int, long and long long. Each of these… Read More
size_t is an unsigned integral data type which is defined in various header files such as:   <stddef.h>, <stdio.h>, <stdlib.h>, <string.h>, <time.h>, <wchar.h> It’s a type… Read More
There are many different ways to make the variable as constant Using const keyword: The const keyword specifies that a variable or object value is… Read More
Here are some logical and interesting facts about data-types and the modifiers associated with data-types:- 1. If no data type is given to a variable,… Read More
How to round off a floating point value to two places. For example, 5.567 should become 5.57 and 5.534 should become 5.53 First Method:- Using… Read More
To represent floating point numbers, we use float, double and long double. What’s the difference? double has 2x more precision than float. float is a… Read More
As already known character range is between -128 to 127 or 0 to 255. This point has to be kept in mind while doing character… Read More
The Boolean data type is one of the primitive data types in both C++ and Java. Although, it may seem to be the easiest of… Read More
The ISO/ANSI C++ Standard has added certain new data types to the original C++ specifications. They are provided to provide better control in certain situations… Read More
Wide char is similar to char data type, except that wide char take up twice the space and can take on much larger values as… Read More

Start Your Coding Journey Now!