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:
How can f be used for both float and double arguments in printf? Aren't they different types?
How can f be used for both float and double arguments in printf? Aren't they different types?
✍: Guest
In the variable-length part of a variable-length argument list, the ``default argument promotions'' apply: types char and short int are promoted to int, and float is promoted to double. (These are the same promotions that apply to function calls without a prototype in scope, also known as ``old style'' function calls. Therefore, printf's %f format always sees a double. (Similarly, %c always sees an int, as does %hd.)
2015-06-17, 1246👍, 0💬
Popular Posts:
What is the difference between "calloc(...)" and "malloc(...)"? 1. calloc(...) allocates a block of ...
How can you check to see whether a symbol is defined? You can use the #ifdef and #ifndef preprocesso...
How To Create an Array in PL/SQL? - Oracle DBA FAQ - Introduction to PL/SQL If you want create an ar...
How Do I Run JUnit Tests from Command Window? To run JUnit tests from a command window, you need to ...
What is Service Oriented architecture? “Services” are components which expose well defined interface...