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
What is the difference between volatile and const volatile?
What are operators in c?
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
What is a shell structure examples?
What do you mean by invalid pointer arithmetic?
Sir i need notes for structure,functions,pointers in c language can you help me please
Write a program to swap two numbers without using the third variable?
What are the features of c language?
Hi can anyone tell what is a start up code?
What is the function of multilevel pointer in c?
What is the purpose of main() function?
What are the types of assignment statements?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
Tell us bitwise shift operators?