i done it in other way.i saw that float* goes to my desired address but not printing next 8bits properly..so from that address i just do forward 8bits and again backed 8bits.then i tell to print next 8bits by %c ..it is working by printing 4
Code:
printf("Size of float=%c\n",((char*)(((float *) (arr))+1))[1]-1)
.. .i think i got it where the problem is
now without any warning my prog will work fine
Code:
#include<stdio.h>
int main()
{
unsigned char arr[15] = { '0', '1', '2', '3', '4','5', '6', '7', '8', '9','a','b','c','d','e' };
printf("Size of char=%c\n", ((char *) (&arr[0]))[1]);
printf("Size of short=%c\n", ((short *) (&arr[0]))[1]);
printf("Size of int=%c\n", ((int *) (&arr[0]))[1]);
printf("Size of long=%c\n", ((char*)(((long *) (arr))+1))[1]-1);
printf("Size of float=%c\n",((char*)(((float *) (arr))+1))[1]-1);
printf("Size of double=%c\n", ((char*)(((double *) (arr))+1))[1]-1);
return 0;
}