It will accept a character from the console or from a file, displays immediately while typing and we need to press Enter key for proceeding.
Syntax:int getchar(void);
--It returns the unsigned char that they read.If end-of-file or an error is encountered getchar() functions return EOF.
Example:#include
int main ()
{
char c;
printf("Enter character: ");
c = getchar();
printf("Character entered: ");
putchar(c);
return(0);
}
op:
Enter character: a
Character entered: a
License.
All information of this service is derived from the free sources and is provided solely in the form of quotations.
This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 107 / 159171093. Delta: 0.00258 с