Assigning int to struct array but prints out as 0 (different) [closed]

You are invoking undefined behavior by passind data having wrong type to printf(). %d expects int, but you are passing double. You should use format specifier %f, %g, %e, or %a to print double.

Format specifyer %.0f or %g should be used to print without printing dots in this case.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top