|
��������
getc, getchar, fgetc, getw - ���������� ������� ���
����� �� ������
���������
#include <stdio.h> int getc (stream) FILE *stream; int getchar ( ) int fgetc (stream) FILE *stream; int getw (stream) FILE *stream;
��������
������ getc ������ � ���� ������ ����� ��������� ������
(����) �� ���������� ������ ����� stream � ����������
������� ������� (���� ��� ����������) �� ���� ������
������. ������ getchar ������������ getc (stdin).
������� fgetc ��������� ���������� getc, �� ����������� ������ ��� �������, � �� ������. ������� fgetc ����������� ���������, ��� getc, �� ��������� � ��� ������� ������ ������, � �� ��� ����� ������������ � �������� ��������� �������.
������� getw ������ � ���� ������ ����� ��������� ����� (��� ����������� ����������� ��� ������ �����) �� ���������� ������ ����� stream � ���������� ������� ������� (���� ��� ����������) �� ����� ������. �������� ������������ ������������ ������� ������� (��������, �� ������� �����) �� �������������� � �� ������������.
��. �����
fclose(3S), ferror(3S), fopen(3S), fread(3S), gets(3S),
putc(3S), scanf(3S), stdio(3S).
�����������
��� ���������� ����� ����� ��� ��� ������������� ������
������������ ��������� EOF. ����� ��������� ��� ��������, ������� ������������ ������� ferror(3S).
�����������
���������� ������� getc ������, ��� �������� ���������
stream ����������� ��������� ���. �������, ��������,
��������� getc(*f++) ������������. � �������� �������
������� ������������ �������� fgetc.
|