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 came across some code that puts a (void) cast before each call to printf. Why?
I came across some code that puts a (void) cast before each call to printf. Why?
✍: Guest
printf does return a value (the number of characters printed, or an error code), though few programs bother to check the return values from each call. Since some compilers (and lint) will warn about discarded return values, an explicit cast to (void) is a way of saying ``Yes, I've decided to ignore the return value from this call, but please continue to warn me about other (perhaps inadvertently) ignored return values.'' It's also common to use void casts on calls to strcpy and strcat, since the return value is never surprising.
2015-05-13, 1140👍, 0💬
Popular Posts:
Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written...
Give me the example of SRS and FRS SRS :- Software Requirement Specification BRS :- Basic Requiremen...
What’ is the sequence in which ASP.NET events are processed ? Following is the sequence in which the...
Write an equivalent expression for x%8? x&7
Which is the best place to store ConnectionString in Dot Net Projects? I am about to deploy my first...