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 / saikat
#include <stdio.h>
int main()
{
float a[2];
int size = (char*)&a[1] - (char*)&a[0];
printf("%d
",size);
return 0;
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
how to build a exercise findig min number of e heap with list imlemented?
c language interview questions & answer
How can I read a binary data file properly?
Why do we use header files in c?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
How can I send mail from within a c program?
Explain the array representation of a binary tree in C.
Is main is user defined function?
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
When can a far pointer be used?
Can you subtract pointers from each other? Why would you?
Which control loop is recommended if you have to execute set of statements for fixed number of times?
What is assignment operator?
What are the similarities between c and c++?
What is the difference between volatile and const volatile?