• Pacenet: getchar() andputchar() in C are functions or macros? and Why?


    Most C implementations impose a significant overhead for
    each function call. Thus we may want to define things that look like
    functions but do not have the function call overhead.
    Due to which
    getchar() and putchar() are usually implemented as macros to avoid having
    to call a function for each character of input or output.


0 comments:

Post a Comment