Eric said:
Yes, but no Standard library function can be implemented
*only* as a macro.
In this case gcc is nonconforming...
$ nm /usr/lib/libc.a 2>&1 | grep putc
putchar.o:
0000000000000000 T putchar
putchar_u.o:
0000000000000000 T putchar_unlocked
fputc.o:
0000000000000000 T fputc
putc.o:
0000000000000000 T _IO_putc
0000000000000000 W putc
fputc_u.o:
0000000000000000 T fputc_unlocked
putc_u.o:
0000000000000000 T putc_unlocked
00000000000000f0 T __argp_fmtstream_putc
You see that putc is ONLY provided as a macro!
Are you the same Sandeep who's writing his Master's thesis on
the C Standard library? I guess not, because someone undertaking such
an effort would surely have read the Standard's description of that
library, and would have come across 7.1.4p1. Read it, and you'll then
know something the other Sandeep has already learned.
Of course I can't memorize every detail, however I will browse the
Standard and get the main points and look at any sections on topics of my
specialization.