#include<stdio.h>
void main(){
int a, b;
char c;
long int ax;
short int s;
double dx;
unsigned long int ux;
printf("Enter two integer value of a and b: ");
scanf("%d %d", &a, &b);
printf("Enter one character value of c: ");
scanf(" %c",&c);
printf("Enter one long integer value of ax: ");
scanf("%ld",&ax);
printf("Enter one sort integer value of s: ");
scanf("%hi",&s);
printf("Enter one double value of dx: ");
scanf("%lf",&dx);
printf("Enter one unsigned long integer value of ux: ");
scanf("%lu",&ux);
// i)((int) dx) + ax
printf("Value of 1st expression ((int) dx) + ax is %d.\n",((int) dx) + ax);
//ii) ax + b
printf("Value of 2nd expression ax + b is %d. \n",(ax + b));
//iii)ax + ux
printf("Value of 3rd expression ax + ux is %d \n",(ax + ux));
//iv) s + c
//int i = (int)c;
printf("Value of 4th expression s + c is %d. \n",(s+c));
}
Comments
Leave a comment