Selasa, 13 November 2012

function OF flush(stdin)

* Assalamu'alaikum
HI All, how are you this morning? Super?

Ok. Today i have survey or question?
very often some of our friends ask me about "what is function for ===fflush(stdin)=== in code block)
...

My question is "is anyone here don't know what is function for ===fflush(stdin)=== in code block.
If any we'll try to explain.

=========
fflush mean menghapus/mengosongkan
So fflush(stdin) berarti melakukan flush (penghapusan) data pada buffer output yang tidak di perlukan

Then what is buffer
buffer is tempat penyimpanan rangkaian perintah dari suatu program.

So when we use it?
Jika terdapat beberapa proses input (memasukkan data) sekaligus, maka sebaiknya ditambahkan fungsi fflush(stdin); setelah fungsi scanf(). Fungsi fflush(stdin) berfungsi menghapus buffer di dalam alat I/O.

What is the affect if don't use this methode?
No problem, but if your program is long or many argument will impact error or not running well.

==================

panjang sekali articlenya
selamat membaca and i hope this article usefull for all of you. regards

Tidak ada komentar:

Posting Komentar