how to find the size of the data type like int,float
without using the sizeof operator?
Answer Posted / sunil
When the parameter is a datatype.
For Eg: sizeof(int), sizeof(double)
#define GetSize(x) (char*)((x*)10 + 1) - (char*)10
When the parameter is a variable.
For Eg: int a;
float b;
sizeof(a), sizeof(b)
#define GetSize(x) (char*)(&x + 1) - (char*)&x
| Is This Answer Correct ? | 10 Yes | 4 No |
Post New Answer View All Answers
Can we increase size of array in c?
Differentiate between null and void pointers.
Explain how do you sort filenames in a directory?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
What is non linear data structure in c?
pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)
What is string function in c?
What does double pointer mean in c?
What are enums in c?
Can we access the array using a pointer in c language?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58
How many loops are there in c?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include