Yohanes Nugroho wrote:
>
> On Thu, 19 Oct 2000, Andy wrote:
>
> > char * ptrString;
> >
> > ptrString="1234567890";
> > puts (ptrString);
> >
> > apakah berbahaya bagi sistem operasi, karena ptrString tidak di alokasi
> > dulu memory-nya
> > dengan malloc?
>
> nggak apa-apa, asal isi ptrString jangan diutak-atik.
>
> ptrString="......";
>
> artinya compiler akan menyediakan suatu tempat dimemori (dan tidak ada
^^^^^^^^^
> jaminan bahwa lokasinya dapat ditulisi) yang berisi string tersebut, lalu
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ah, saya sendiri baru tahu... ini berarti
ptrString[0] = 'x';
bisa saja gagal pada C compiler tertentu?
He he maklum C memang sedikit reserve wordnya tapi banyak
aturannya.
Belum lagi standard K&R/Trad C != ANSI C != C++
gcc -Wall, -traditional & g++ saja tidak memberi
warning apa2...
--
+---| Netscape Communicator 4.x |---| Powered by Linux 2.2.x |---+
|/v\ Agus Budy Wuysang MIS Department |
| | Phone: +62-21-344-1316 ext 317 GSM: +62-816-1972-051 |
+--------| http://www.rad.net.id/users/personal/s/supes |--------+
--------------------------------------------------------------------------------
Utk berhenti langganan, kirim email ke [EMAIL PROTECTED]
Informasi arsip di http://www.linux.or.id/milis.php3
Pengelola dapat dihubungi lewat [EMAIL PROTECTED]
- Re: [programming] call by reference di c for linux Andy
- Re: [programming] call by reference di c for linux Andy
- Re: [programming] call by reference di c for linux Ronny Haryanto
- Re: [programming] call by reference di c for linux Yohanes Nugroho
- Re: [programming] call by reference di c for linux Yohanes Nugroho
- Re: [programming] call by reference di c for linux Danny Setiawan
- Re: [programming] call by reference di c for linux Benny Prijono
- Re: [programming] call by reference di c for linux Agus Budy Wuysang
- Re: [programming] call by reference di c for linux Agus Budy Wuysang
- Re: [programming] call by reference di c for linux Agus Budy Wuysang
- Re: [programming] call by reference di c for linux Yohanes Nugroho
- Re: [programming] call by reference di c for linux Agus Budy Wuysang
- Re: [programming] call by reference di c for linux Edwin Pratomo
- Re: [programming] call by reference di c for linux Ronny Haryanto
- Re: [programming] call by reference di c for linux Steven Haryanto
- Re: [programming] call by reference di c for linux Oki DZ
- Re: [programming] call by reference di c for linux Ikhlasul Amal
- Re: [programming] call by reference di c for linux Yohanes Nugroho
- Re: [programming] call by reference di c for linux Agus Budy Wuysang
- Re: [programming] call by reference di c for linux Oki DZ
