Re: how to print a short and long integer?
- From: Martin Ambuhl <mambuhl@xxxxxxxxxxxxx>
- Date: Sun, 25 Sep 2005 06:36:23 GMT
a wrote:
short s;
long l;
s= -2;
l= -3;
printf("% _ %_",s, l);
What characters should be filled out in the formatted string for output?
Thanx
#include <stdio.h> int main(void) { short s = -2; long l = -3; printf("The standard way using \"%%hd %%ld\": %hd %ld\n", s, l); printf(" (but \"%%d %%ld\" should work as well: %d %ld\n", s, l); return 0; }
The standard way using "%hd %ld": -2 -3 (but "%d %ld" should work as well: -2 -3 .
- References:
- Prev by Date: Re: how to print a short and long integer?
- Next by Date: Re: Pelles C POLIB.EXE /EXPLODE utility
- Previous by thread: Re: how to print a short and long integer?
- Next by thread: Re: how to print a short and long integer?
- Index(es):
Relevant Pages
|