What is stdin in C?

I want to create my own scanf function. The main idea is data from a memory address and storing it at another memory address.

What is stdin? Is it a memory address like 000ffaa? If this is a memory address, what is it, I can create my own scanf function. Thank!.

+4
source share
3 answers

No, stdinit is not a "memory address".

This is an input / output stream, basically an abstraction of the operating system level, which allows you to read data (or write in case stdout).

To read from a stream, you need to use the correct stream I / O functions.

, , , , , stdin.

- :

int my_scanf(int (*getchar_callback)(void *state), void *state, const char *fmt, ...);

. state - , getchar_callback() my_scanf().

+5

stdin - " ", , . , -. - .

/ . , , , . , Windows, API.

scanf, API , .

+2
0

All Articles