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...

Can U write a C-program to print the size of a data type
without using the sizeof() operator? Explain how it works
inside ?

Answer Posted / saikat

#include <stdio.h>

int main()
{
float a[2];

int size = (char*)&a[1] - (char*)&a[0];

printf("%d
",size);
return 0;
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use static in c?

1074


What is the difference between text and binary modes?

1139


hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

2141


What is meant by high-order and low-order bytes?

1009


What is abstract data structure in c?

983


Differentiate between the = symbol and == symbol?

1223


What is stack in c?

1036


What happens if header file is included twice?

1098


What are the types of macro formats?

1068


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc

5570


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

1224


What is the difference between null pointer and wild pointer?

1146


What are the three constants used in c?

941


How can I make sure that my program is the only one accessing a file?

1204


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1934