Berikut dua contoh program C++ untuk array 1 dimensi, semoga dapat membantu tugasnya.
#include <stdio.h>
int main (){
char a[8];
for (int i=0; i<8; i++){
printf("%x\n",&a[i]);
}
return 0;
}
int main (){
char a[8];
for (int i=0; i<8; i++){
printf("%x\n",&a[i]);
}
return 0;
}
==========///==============///===============///===========
#include <stdio.h>
int main()
{
int a[8];
for (int i=0; i<8; i++){
printf("%x\n",&a[i]);
}
}
int main()
{
int a[8];
for (int i=0; i<8; i++){
printf("%x\n",&a[i]);
}
}
Script diatas merupakan contoh program array 1 dimensi yang sangat amat simple, dan mudah dipelajari
Thanks for reading & sharing RZDev: Belajar Programming!
0 comments:
Post a Comment