Can U write a C-program to print the size of a data type
without using the sizeof() operator? Explain how it works
inside ?
Answer Posted / rajesh
#include<stdio.h>
int main()
{
int p;
printf("%d\n",(char*)(&p+1)-(char*)(&p));
return 0;
}
| Is This Answer Correct ? | 8 Yes | 3 No |
Post New Answer View All Answers
What is #pragma statements?
Explain what is the advantage of a random access file?
if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.
difference between Low, Middle, High Level languages in c ?
What is difference between class and structure?
What does malloc () calloc () realloc () free () do?
What is void main ()?
What is scope of variable in c?
Explain what is the benefit of using enum to declare a constant?
What are file streams?
Why is c not oop?
What is the use of ?
When is a void pointer used?
The statement, int(*x[]) () what does in indicate?
What does typedef struct mean?