Poi nter si mpl e #include <stdio> #include #include main () { int satu; int *lokasi,value; satu=5; lokasi=&satu; value=*lokasi; cout << "satu = " << satu << endl; cout << "lokasi = " << lokasi << endl; cout << "value = " << value << endl; getch(); }
andy = 25; fred = andy; ted = &andy;
andy = 25; fred = andy; ted = &andy; beth = *ted;
char a; char * b; char ** c; a = 'z'; b = &a; c = &b; c has type char** and a value of 8092 *c has type char* and a value of 7230 **c has type char and a value of 'z'
Poi nter to Poi nter
#include <stdio> #include #include bates() {cout<<"================================"<<endl;} main () { int satu; int *lokasi,value; //pointer ke pointer int ** value2; satu=5; lokasi=&satu; //pointer ke pointer value2=&lokasi; value=*lokasi; cout << "satu = " << satu << endl; cout << "lokasi = " << lokasi << endl; cout << "value = " << value << endl;bates(); //hasil pointer ke pointer cout << "value pointer *= " << *value2 << endl; cout << "value pointer **= " << **value2 << endl; getch(); }
Dekl arasi Functi on Prot otype
#include<stdio.h> #include #include //nama function hitungvolume(float jari); hitungluas(float jari); main() { float kerucut_l,kerucut_v; int jari; clrscr(); cout<<"Masukan Jari = ";cin>>jari; //panggil function kerucut_v=hitungvolume(jari); kerucut_l=hitungluas(jari); cout<<"Volume Kerucut = "<
Tugas Searching
I nl ine Fun cti on
Tidak bol eh sama dengan modul Cari Source c od e nya Jelaskan teori nya / Mahasi swa Kirim ke tugasaye@gmai l.co m