#include<iostream> using namespace std ; int main ( ) { char c; float f; int i; short s; double d; long double ld ; int array [20]; int *ptr=array; cout<<"sizeof c ="<<sizeof c; cout<<"sizeof(char)"<<sizeof(char); cout<<"sizeof f="<<sizeof f; cout<<"sizeof(float)"<<sizeof(float); cout<<"sizeof i="<<sizeof i; cout<<"sizeof(int)"<<sizeof(int); cout<<"sizeof d="<<sizeof d<<end; cout<<"sizeof(double)"<<sizeof(double); cout<<"sizeof ld="<<sizeof ld; cout<<"sizeof (long double)"<<sizeof(long double); cout<<"sizeof array ="<<sizeof array ; cout<<"sizeof ptr ="<<sizeof ptr<<endl; //end main }
Subscribe to:
Post Comments (Atom)
Post A Comment:
0 comments: