-
Notifications
You must be signed in to change notification settings - Fork 0
/
3rd.cpp
36 lines (33 loc) · 1.33 KB
/
3rd.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include<iostream>
using namespace std;
int main()
{
int mm ;
long double xx[20];
float yy[20];
double zz[20];
cout << "Godzina prawdy. W tym komputerze "
<< "poszczegolne typy\n"
<< "maja nastepujace rozmiary w bajtach: \n" ;
cout << "typ char : \t" << sizeof(char) << endl ;
cout << "typ int : \t" << sizeof(int) << endl ;
cout << "typ short : \t" << sizeof(short) << endl ;
cout << "typ long : \t" << sizeof(long) << endl ;
cout << "typ float : \t" << sizeof(float) << endl ;
cout << "typ double : \t" << sizeof(double) << endl ;
cout << "typ long double : \t"<< sizeof(long double)
<< endl ;
cout << "(rozmiar bitowy) tablica long double : "
<< sizeof(xx) << endl ;
cout << "(rozmiar bitowy) tablica float : "
<< sizeof(yy) << endl ;
cout << "(rozmiar bitowy) tablica double : "
<< sizeof(zz) << endl ;
cout << "tablica long double : "
<< (sizeof(xx)/sizeof(*xx)) << endl ;
cout << "tablica float : "
<< (sizeof(yy)/sizeof(*yy)) << endl ;
cout << "tablica double : "
<< (sizeof(zz)/sizeof(*zz)) << endl ;
return 0;
}