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:
Why doesnt this code work?
Why doesn't this code:
double d;
scanf("%f", &d);
work?
✍: Guest
Unlike printf, scanf uses %lf for values of type double, and %f for float.%f tells scanf to expect a pointer-to-float, not the pointer-to-double you gave it. Either use %lf, or declare the receiving variable as a float.
2015-10-30, 1910👍, 0💬
Popular Posts:
What is the value of this expression? +1-2*3/4 -0.5
What invokes a thread's run() method? After a thread is started, via its start() method of the Threa...
What will be printed as the result of the operation below: main() { int a=0; if (a==0) printf("Cisco...
How do you pass control from one JSP page to another? Use the following ways to pass control of a re...
How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters? Unicode requires 1...