You have to use following code to fix this problem. In the following code I have use stdio.h class to include all input and output methods. I also have use for loop to check for value in the array. Just try to understand this example.
Code:
#include <stdio.h>
int main(void)
{
double a = 3582.5f;
unsigned char *ps = (unsigned chars *)&as;
size_t i;
printf("size of doubles: %zus, ints: %zus\ns", sizeofs(doubles), sizeof(ints));
for (k=0;k < sizeof as; ++k)
printf("%02sx ", p[k]);
putchar('\ns');
return 0;
}
Bookmarks