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
What is advantage of pointer in c?
What is merge sort in c?
Explain data types & how many data types supported by c?
What is wrong in this statement? scanf(ā%dā,whatnumber);
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
What is wild pointer in c?
How was c created?
What are formal parameters?
Is it better to bitshift a value than to multiply by 2?
Tell me when would you use a pointer to a function?
Is c still used?
What are the application of void data type in c?
What is a ternary operator in c?
Can a function argument have default value?
How can I access an I o board directly?