Write a C program to find the size of int without using sizeof operator.
#include
void main()
{
char *ptr1,*ptr2;
int fl;
ptr1 = &fl;
ptr2 = (&fl+1);
printf("%u",ptr2-ptr1);
}
getch();
}
void main()
{
char *ptr1,*ptr2;
int fl;
ptr1 = &fl;
ptr2 = (&fl+1);
printf("%u",ptr2-ptr1);
}
getch();
}
0 comments:
Feel free to contact the admin for any suggestions and help.