contoh program ARRAY POINTER, C++

Contoh program C++ Pointer
// +--------------------------------------------------- +
// + ARRAY POINTER                                                  +
// +--------------------------------------------------- +

# include <iostream.h>
# include <conio.h>
void main ()
{
    clrscr(); //Hapus layar
    char *nama_hari[] = { "senin", "selasa", "rabu", "kamis", "jumat", "sabtu", "minggu" };

    for (int i = 0; i < 7; i++)
    cout << nama_hari [i] << endl;
}

0 komentar:

Post a Comment

Copyright © 2014 Dunia Naeta All Right Reserved