p1

#include using namespace std; int main(void) { int tab[10] = { 1, 5, 6 }; int i = 10; int *pi; pi = &i; cout << "i: "<< i << endl; cout << "tab[0]: "<< tab[0] << endl; cout << "pi: " << pi << endl; cout << "*pi: " << *pi << endl; cout << "pi[0]: " << pi[0] << endl; cout << "*tab: " << *tab << endl; cout << "tab: " << tab << endl; pi = tab; cout << "*pi: " << *pi << endl; cout << "sizeof(int): "<< sizeof(int) << endl; cout << "sizeof(i): " << sizeof(i) << endl; cout << "rozmiar tab: "<< sizeof(tab)/sizeof(tab[0]) << endl; for (int j = 0; j < sizeof(tab)/sizeof(tab[0]); j++) cout << pi[j] << endl; cout << sizeof(tab) << " != " << sizeof(pi) << endl; return (0); }
Wyszukiwarka

Podobne podstrony:
cpe hb samp p1
fce hb samp p1
ch5 pl p1
P1
D3 P1
Podstawy Nieprzemiennego Rach Prawd Lenczewski p1
GA P1 132 model
egzamin gimnazjalny 2012 przyroda P1 122
L11 P1
2003 p1 answers
KOLO P1 rozwiazany
p1
certyfikat mieszkanie P1
3 p1 a2

więcej podobnych podstron