Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   how to read value directly into variable rather than buffer (http://www.go4expert.com/forums/read-value-directly-variable-buffer-t7402/)

Kailash 20Nov2007 11:26

how to read value directly into variable rather than buffer
 
Can anyone tell me what r the various function are available in c and C++ that read value directly into variable rather than buffer and please also give me some examples of these methods.

shabbir 20Nov2007 17:28

Re: how to read value directly into variable rather than buffer
 
What is the difference between the two and can you please clarify what you mean by buffer and variable.

Kailash 21Nov2007 10:55

Re: how to read value directly into variable rather than buffer
 
first thing is that when we run a program it goes in to buffer. so that CPU can execute it fastly. and when ask for value from user, the value first goes into buffer and after pressing enter it goes into variable.

bcoz buffer had limited size so when buffer overrun. In that case compiler gives error.

shabbir 21Nov2007 17:37

Re: how to read value directly into variable rather than buffer
 
But the buffer size is the variable size and so if you have sufficient variable size then you will not have the problem of overflowing.


All times are GMT +5.5. The time now is 14:54.