write a program for size of a data type without using
sizeof() operator?
Answer Posted / g
This code will work in TC with 2 warnings but can get result
void main()
{
char *Ptr1,*Ptr2;
float fl;
ptr1 = &fl;
ptr2 = (&fl+1);
printf("%u",ptr2-ptr1);
}
This is a way to get the size of data type...waiting for
any other way...
Is This Answer Correct ? | 44 Yes | 26 No |
Post New Answer View All Answers
What's the difference between constant char *p and char * constant p?
What are compound statements?
Why do we use null pointer?
How can I remove the trailing spaces from a string?
Explain what is the purpose of "extern" keyword in a function declaration?
Whats s or c mean?
Explain how can you determine the size of an allocated portion of memory?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
What is the g value paradox?
What is typedef?
What is the use of a semicolon (;) at the end of every program statement?
How many identifiers are there in c?
What is a program flowchart and explain how does it help in writing a program?
What is "Hungarian Notation"?
Can you write the function prototype, definition and mention the other requirements.