how to find the size of the data type like int,float
without using the sizeof operator?
Answer Posted / ravi.jnv
Its possible by pointers.
-----------------
int one,two;
int *ptrOfOne,*ptrOfTwo;
int size;
ptrOfOne = &one;
ptrOfTwo = &two;
size = ptrOfOne - ptrOfTwo ; /* u can get minus value also
depending upon stack how it pushes variables */
| Is This Answer Correct ? | 6 Yes | 28 No |
Post New Answer View All Answers
Why is c called c not d or e?
Explain the use of 'auto' keyword
Give the rules for variable declaration?
What does %p mean?
How are Structure passing and returning implemented by the complier?
What is console in c language?
How can I change their mode to binary?
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.
The __________ attribute is used to announce variables based on definitions of columns in a table?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
Can the curly brackets { } be used to enclose a single line of code?
Is c high or low level?
What is the difference between null pointer and wild pointer?
When should volatile modifier be used?
How can I get random integers in a certain range?