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
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
Why static variable is used in c?
What is a constant and types of constants in c?
What does it mean when the linker says that _end is undefined?
What is a const pointer?
Explain what is the difference between null and nul?
How can this be legal c?
how to write a c program to print list of fruits in alpabetical order?
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
what is reason of your company position's in india no. 1.
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..
explain what are actual arguments?
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset
Are local variables initialized to zero by default in c?
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()