Wednesday, February 16, 2011

Managing Input Output Operations

The program illustrates the output of integer numbers under various formats.
#include <stdio.h>
void main()
{

int m = 12345;
long n = 987654;
printf("%d\n",m);
printf("%10d\n",m);
printf("%010d\n",m);
printf("%-10d\n",m);
printf("%10ld\n",n);
printf("%10ld\n",-n);
getch();
}

No comments:

Post a Comment