what is the difference between getc and getchar
??
what is the difference between putc and putchar
??
what is the difference between getc and getchar
??
what is the difference between putc and putchar
??
Don't you have a reference book? You should buy one. Otherwise, learn to use a search engine.
Quzah.
Hope is the first step on the road to disappointment.
i read them i cant spot the differece
You clearly aren't making any effort at all. All I do is type "man getc" into my browser, and presto:
getc
Then I read the nice little paragraph on what each one does:
I'll let you figure out the second pair.The getc() function acts essentially identically to fgetc(), but is a
macro that expands in-line.
The getchar() function is equivalent to getc(stdin).
Quzah.
Hope is the first step on the road to disappointment.
why puts("") means go to a new line??
Because that's the way they wrote it. Seriously dude, buy a reference book, or learn to use a search engine.
Quzah.
Hope is the first step on the road to disappointment.
but its not puts('\n')
And? Some functions read characters. Some read lines. Some display characters. Some display lines.
Quzah.
Hope is the first step on the road to disappointment.
It's just defined as being that way. This is also from an online man page that I found as my first entry in a google search:
Quzah is right - with 1350 posts you really should have learned how to find things like this on your own by now.puts(3,n)() writes the string(3,n) s and a trailing newline to stdout.
Lol, I really think this post is only to disturb the slumber of quzah from his den.
How can you possibly ask what the difference is when they have different function signatures???
int getc( FILE* )
int getchar( void )
int putc( int, FILE* )
int putchar( int )
"I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008
"the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010