问一下《The C Prpgramming Language》P45几句话的意思
描述一下:
它是在讲强制类型转换的内容,标准库函数sqrt的参数要求是double的,所以我们可以使用sqrt((double)n)来调用,其中n是int。之后几句话没看懂,最后它又讲root2 = sqrt(2),可以自动把2转换成double的2.0。想问一下中间的几句话是什么意思?
中间几句话如下:
If arguments are declared by a function prototype,as they normally should be,the declaration causes automatic coercion of any arguments when the functtion is called. Thus,given a function prototype for sqrt:
double sqrt(double)
the call
root2 = sqrt(2);......
谁能通俗地解释一下?