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:
What printf format should I use for a typedef like size_t when I don't know whether it is long or some other type?
What printf format should I use for a typedef like size_t when I don't know whether it is long or some other type?
✍: Guest
Use a cast to convert the value to a known, conservatively-sized type, then use the printf format matching that type. For example, to print the size of a type, you might use
printf("%lu", (unsigned long)sizeof(thetype));
2015-11-04, 1315👍, 0💬
Popular Posts:
What are urlencode() and urldecode() functions in PHP? string urlencode(str) - Returns the URL encod...
How can method defined in multiple base classes with same name be invoked from derived class simulta...
What is the difference between "printf(...)" and "sprintf(...)"? sprintf(...) writes data to the cha...
How To Create an Add-to-Bloglines Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS News...
Can Sub Procedure/Function Be Called Recursively? - Oracle DBA FAQ - Creating Your Own PL/SQL Proced...