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


Please Help Members By Posting Answers For Below Questions

Tell us two differences between new () and malloc ()?

612


When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.

1527


What is meant by inheritance?

630


What is modeling?

642


Explain two-dimensional array.

624






what is the different bitween abap and abap-hr?

1741


Describe the modifier in c?

597


how can use subset in c program and give more example

1494


What is c programing language?

612


What is the significance of scope resolution operator?

851


What do you mean by a sequential access file?

621


What are the 4 data types?

592


When would you use a pointer to a function?

584


What is array within structure?

581


What do mean by network ?

653