how to find the size of the data type like int,float
without using the sizeof operator?
Answer Posted / abhishek pathak mnnit
#include <stdio.h>
#define sizeof(x) ((void *)(&x + 1) - (void *)(&x))
void main()
{
int a;
printf("int size=%d",sizeof(a));
}
| Is This Answer Correct ? | 3 Yes | 8 No |
Post New Answer View All Answers
How can I generate floating-point random numbers?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.
What is typedef struct in c?
If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above
Is there a way to compare two structure variables?
What is p in text message?
What is keyword with example?
What is your stream meaning?
Can variables be declared anywhere in c?
What is the difference between if else and switchstatement
What does it mean when the linker says that _end is undefined?
Explain what is wrong with this program statement? Void = 10;
how to print the character with maximum occurence and print that number of occurence too in a string given ?
Is this program statement valid? INT = 10.50;
What do mean by network ?