how to find the size of the data type like int,float
without using the sizeof operator?

Answer Posted / amit prakash

main()
{
int a;
int *aa,*bb;
int size;
aa = &a;
bb=aa;
bb++;
size=bb-aa;
printf("\nsize_of_int:%u",size) ; // actual size but
depends upon compiler
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the two forms of #include directive?

636


What is the role of this pointer?

540


How can you tell whether a program was compiled using c versus c++?

613


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

1693


What are the 5 types of inheritance in c ++?

571






All technical questions

1501


Tell me about low level programming languages.

634


What is a ternary operator in c?

646


How is null defined in c?

645


How can I copy just a portion of a string?

808


What does int main () mean?

539


a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list

619


Do you know what are bitwise shift operators in c programming?

577


What is wrong with this program statement? void = 10;

809


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

7385