Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
I thought that ANSI function prototypes were supposed to guard against argument type mismatches.
I thought that ANSI function prototypes were supposed to guard against argument type mismatches.
✍: Guest
When a function accepts a variable number of arguments, its prototype does not (and cannot) provide any information about the number and types of those variable arguments. Therefore, the usual protections do not apply in the variable-length part of variable-length argument lists: the compiler cannot perform implicit conversions or (in general) warn about mismatches. The programmer must make sure that arguments match, or must manually insert explicit casts.
In the case of printf-like functions, some compilers (including gcc) and some versions of lint are able to check the actual arguments against the format string, as long as the format string is an immediate string literal.
2015-11-06, 1086👍, 0💬
Popular Posts:
What is the method to customize columns in DataGrid? Use the template column.
What is the main difference between a Vector and an ArrayList? Java Vector class is internally synch...
Can you explain in brief how can we implement threading ? Private Sub Form1_Load(ByVal sender As Sys...
How to measure functional software requirement specification (SRS) documents? Well, we need to defin...
What will be printed as the result of the operation below: main() { char *p1; char *p2; p1=(char *)m...