Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to find the size of the data type like int,float
without using the sizeof operator?

Answer Posted / vishnu948923

void main()
{
char *ptr1,*ptr2;
float fl;
ptr1 = &fl;
ptr2 = (&fl+1);

printf("%u",ptr2-ptr1);
}

Is This Answer Correct ?    29 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

2396


Is c high or low level?

956


What is the difference between exit() and _exit() function in c?

1013


Can a pointer be volatile in c?

929


What is a union?

976


Tell us the use of fflush() function in c language?

1083


write a program to create a sparse matrix using dynamic memory allocation.

4830


What is the difference between int main and void main in c?

1088


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

1011


With the help of using classes, write a program to add two numbers.

980


Write a program to reverse a linked list in c.

1057


Explain null pointer.

1034


What are the types of i/o functions?

1246


How can I remove the trailing spaces from a string?

1024


What is the use of bit field?

1112