IMPORTANT PROGRAMS FOR EXAMINATION PREPARATION
1. PROGRAM TO READ INPUT DATA AND GIVE THE OUTPUT OF VARIOUS VARIABLES
#include<stdio.h>
#include<conio.h>
int main()
{
short x;
int y;
long z;
printf("\nEnter the short value ");
scanf("%hd",&x);
printf("\nEnter the integer value ");
scanf("%d",&y);
printf("\nEnter the long integer value ");
scanf("%ld",&z);
printf("\nPRINTING THE VALUE OF VARIOUS NUMERIC INTEGRAL VALUES \n");
printf("\nShort value x has %hd and size of short is %u",x,sizeof(x));
printf("\nInteger value y has %d and size of Integer is %u",y,sizeof(y));
printf("\nLong Integer value z has %ld and size of long integer is %u",z,sizeof(z));
getch();}
No comments:
Post a Comment