a. int tinggi[];= SALAH
b. int angka[]={21,25,32,19};= BENAR
c. int lebar[4];= BENAR
d. int matrik[][]={3,5,8,}; SALAH
b. int angka[]={21,25,32,19};= BENAR
c. int lebar[4];= BENAR
d. int matrik[][]={3,5,8,}; SALAH
Dua
perintah di bawah ini adalah identik.
for (a = 1; a <= 5; a++) { cout << “Hello world \n”; } dengan a = 1; while (a <= 5) { cout << “Hello world \n”; a++; } |
a
= 1;
do { cout << “Hello world \n”; a++; } while(a==0) |
27
|
23
|
35
|
46
|
87
|
Data yang tersimpan di array
|
0
|
1
|
2
|
3
|
4
|
Alamat array (dimulai dari 0)
|