How do you input a LONG datatype or print it using printf? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How do you input a LONG datatype or print it using printf?

How do you input a LONG datatype or print it using a format string? For example, integer is "%i" and float is "%f"...how do you output a LONG (without the .000...)??


Please respond by e-mailing me...([email protected]), I probably won't have time to check to see if i get any responses...


Thanks,


~Eric


Comments

  • : How do you input a LONG datatype or print it using a format string? For example, integer is "%i" and float is "%f"...how do you output a LONG (without the .000...)??


    If you mean a 'long' (C is case sensitive), then the C conversion code for the scanf and printf family of functions is "%ld" or "%li".




    : Please respond by e-mailing me...([email protected]), I probably won't have time to check to see if i get any responses...


    : Thanks,


    : ~Eric





Sign In or Register to comment.