Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
NFORMAT.C
◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
/* NFORMAT.C: Prints numbers and a string. */
#include <stdio.h>
#include <string.h>
main()
{
int a = -765,
b = 1,
c = 44000,
d = 33;
float e = 1.33E8,
f = -0.1234567,
g = 12345.6789,
h = 1.0;
char i[80];
strcpy( i, "word 1, word 2, word 3, word 4, word 5" );
printf( "Unformatted:\n%d %d %d %d\n", a, b, c, d );
printf( "%f %f %f %f\n", e, f, g, h );
printf( "%s\n", i );
}