Server for Information Technologies ������ ��������������
������� �������������� ����������
(095) 932-9212, 932-9213, 939-0783
E-mail: [email protected]
������ �������� ����(!) ������������� ���������� CIT Forum CD-ROM

GETS(3S)

��������
gets, fgets - ������ ������� �������� �� ������

���������

	#include <stdio.h>
	
	char *gets (s)
	char *s;
	
	char *fgets (s, n, stream)
	char *s;
	int n;
	FILE *stream;

��������
������� gets ������ ������� �� ������������ ������ ����� stdin � ������� ������, �� ������� ��������� �������� s. ������ ������������ �� ��� ���, ���� �� ���������� ������� ������ ��� ����� �����. ������ �������� ������ �������������, � ����������� ������� �������������� ������� ������.

������� fgets ��������� (n-1) �������� �� ������ ����� stream � ������� ������, �� ������� ��������� �������� s. ������ ������������ �� ��� ���, ���� �� ���������� ������� ������ (� ������� �� gets �� �� �������������) ��� ����� �����. ����������� ������� �������� �������������� ������� ������.

��. �����
ferror(3S), fopen(3S), fread(3S), getc(3S), scanf(3S), stdio(3S).

�����������
���� ������ ����������� �������� �������� ������� ����� �����, �� ���� ���������� �� ������ ������� �� ����� �������, �� ��� ������� ���������� ������ ��������� NULL. ���� ���������� ������ ������, ��������, ��� ������� ������������ ��� ������� ��� ������, �� �������� �� ������, �� ����� ������������ NULL. � ��������� ������� ������������ �������� ��������� s.
Comments: [email protected]
Designed by Andrey Novikov
Copyright © CIT