how to find the size of the data type like int,float
without using the sizeof operator?
Answer Posted / amit prakash
main()
{
int a;
int *aa,*bb;
int size;
aa = &a;
bb=aa;
bb++;
size=bb-aa;
printf("\nsize_of_int:%u",size) ; // actual size but
depends upon compiler
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How can I pad a string to a known length?
List some of the static data structures in C?
What is a struct c#?
what is reason of your company position's in india no. 1.
What is "Hungarian Notation"?
What does sizeof function do?
Why does everyone say not to use scanf? What should I use instead?
Differentiate between full, complete & perfect binary trees.
What are the types of c language?
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
What is unary operator?
What are the salient features of c languages?
What is a char in c?
Is malloc memset faster than calloc?
How was c created?