Array C++ adalah tempat menyimpan sejumlah data yang bertipe sama dalam satu variabel123. Data yang menyusun array disebut elemen, yang dapat diakses melalui indeks1345. Indeks array dimulai dari 045. Array C++ bisa digunakan untuk membuat string (array of char)1.

#include 
using namespace std;
int main() {
    int deretAngka[10] = {7,3,5,4,2,9,6,8,10};
    cout << "Angka = " << deretAngka[3] << endl;
    int i, j, maksimal = 5;
    char nama[maksimal][100];
    i = 0;
    while (i < maksimal) {
       cout << "Masukan data :";
       cin >> nama[i];
       i++;
   }

   // MENAMPILKAN DATA YANG SUDAH DIINPUT KE ARRAY

   cout << endl;
   cout << "List Data :";
   cout << endl;
   j = 0;

   while (j < maksimal) {
       cout << nama[j];
       cout << endl;
       j++;
   }
}

By Juri Pebrianto

IT and software developer From 2014, I focus on Backend Developers with the longest experience with the PHP (Web) programming language, as I said above, I open myself up to new technologies about programming languages, databases and everything related to programming or software development. I have a new experience for React-Js, React-Native, Go-Lang, by the way, this website juripebrianto.my.id is made with React-Js technology as the frontend and Go-Lang as the API and CMS and uses MongoDB as the database.