In C, since function overloading is not supported, what does printf do? In the C language, is it not overloaded?

Source: Internet
Author: User
That's a good question to ask.
In fact, printf is not overloaded, C language does not support function overloading this sentence is right.
The printf function is implemented by a variable-length parameter table . You can look at the function prototype declaration of printf.
The implementation of printf functions is different on different machines, but the interfaces provided are consistent.
The correct declaration form of the printf function is as follows:
int printf (const *FMT,...)
Where ellipses indicate that the number and type of parameters in the parameter table are variable. It is a fixed form of a variable-length parameter table.
Ellipses can only appear at the end of the parameter table.
In particular, you should check the Internet, I did not study the prototype.
I think since you can ask this question, the information is not difficult to understand, soon can understand what is going on. Once you understand it, you'll be able to write the function of the variable-length parameter table yourself. Good cheer!

Note: Go from this link: Http://zhidao.baidu.com/question/487210770.html?qbl=relate_question_2&word=c%D3%EF%D1%D4%D3%D0%BA %af%ca%fd%d6%d8%d4%d8%c2%f0

In C, since function overloading is not supported, what does printf do? In the C language, is it not overloaded?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.