Problem Description
To find the byte value of a given two variables. In that case need to use 2 variables, first variable gets the value during run time and the second variable holds the value at the time of declaration.CODING ARENA::
#include <stdio.h>
int main()
{
float a;
int x;
scanf("%f",&a);
x=sizeof(a);
printf("%d %ld",x,sizeof(x)*2);
return 0;
}
Test Case 1
Input (stdin)0.7
Expected Output4 8
Test Case 2
Input (stdin)16.5
Expected Output4 8
This comment has been removed by the author.
ReplyDelete