Write a  C++ Program to Find Size of int, float, double and char

C++ Program to Find Size of int, float, double and char

Welcome to the World of Online Learning:

Hello Friends “This blog helps you to learn C++ programming concepts. You can learn C++ language at your own speed and time. One can learn concepts of C++ language by practicing various programs given on various pages of this blog. Enjoy the power of Self-learning using the Internet.”

C++ Program to Find Size of int, float, double and char
C++ Program to Find Size of int, float, double and char

Write a  C++ Program to Find Size of int, float, double and char in Your System

PROGRAM: Program to Find Size of int, float, double and char in Your System

/*C++ Program to Find Size of int, float, double and char in Your System*/
#include <iostream>
using namespace std;

int main() 
{    
    cout << "Size of char: " << sizeof(char) << " byte" << endl;
    cout << "Size of int: " << sizeof(int) << " bytes" << endl;
    cout << "Size of float: " << sizeof(float) << " bytes" << endl;
    cout << "Size of double: " << sizeof(double) << " bytes" << endl;

    return 0;
}

Leave a Reply

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