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
What is a shell structure examples?
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.
Explain can the sizeof operator be used to tell the size of an array passed to a function?
Why array is used in c?
explain how do you use macro?
What are identifiers and keywords in c?
Explain why c is faster than c++?
What is signed and unsigned?
Wt are the Buses in C Language
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.
Explain how do you print an address?
What is a list in c?
Is c object oriented?
what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?
Can we change the value of static variable in c?