C++ Program:

- To print the size of various data types

Example:

Size of int : 4 bytes

#include <iostream>
using namespace std;

int main() {
  cout<<"Size of int : "<<sizeof(int)<<" bytes"<<endl;
  cout<<"Size of char : "<<sizeof(char)<<" byte"<<endl;
  return 0;
}

Output:

  Size of int : 4 bytes
  Size of char : 1 byte
Program
basic

Just use :

sizeof(dataType)

Just replace dataType value with the one, you want to know size of
dataTypes like: int, char, bool, float, double, . . . .

Concept

Coming Soon !

Quick
Tutorial

Quote

Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning.