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
What is a constant?
What are extern variables in c?
What is meant by realloc()?
Explain how can I make sure that my program is the only one accessing a file?
How do you override a defined macro?
How do you list files in a directory?
In C programming, how do you insert quote characters (‘ and “) into the output screen?
what are the advantages of a macro over a function?
What is anagram in c?
What does s c mean on snapchat?
write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);
Are local variables initialized to zero by default in c?
How to delete a node from linked list w/o using collectons?
What is exit() function?
What are Macros? What are its advantages and disadvantages?