At least: wrong format specifier.
// double address
printf("\nDensity of the Box Is %.2f\n\n", &den);
Save time, enable all warnings. A good well enabled compiler will warn about this mismatch.
More Related Contents:
- Find the Biggest Number in C, BUT with characters
- how will i pass the path of a file name to void *buffer using c language?
- Defining sqrt as type int in C?
- How to iterate over this series 5 6 7 6 5 6 7 6 5 6 7 6 5… in C? [closed]
- The Definitive C Book Guide and List
- Read/write files within a Linux kernel module
- Why does the order of ‘-l’ option in gcc matter? [duplicate]
- hash function for string
- Why cast an unused function parameter value to void?
- How to create type safe enums?
- Why can’t I cast a function pointer to (void *)?
- sem_init on OS X
- When the main thread exits, do other threads also exit?
- C: unary minus operator behavior with unsigned operands
- What are the differences between strtok and strsep in C
- How do I execute a Shell built-in command with a C function?
- How to compile .c file with OpenSSL includes?
- Why is printf round floating point numbers up?
- How does fork() work?
- Unable to free const pointers in C
- Compute fast log base 2 ceiling
- How do you set only certain bits of a byte in C without affecting the rest?
- Why can I change the value of a const char* variable?
- Why is strdup considered to be evil
- Does the C standard consider that there are one or two ‘struct uperms_entry’ types in this header?
- Integer conversions(narrowing, widening), undefined behaviour
- SegFault after scanf?
- Problem usage memory in C
- Floating point linear interpolation
- Get directory separator char on Windows? (‘\’, ‘/’, etc.)