write a program for size of a data type without using
sizeof() operator?
Answer Posted / lalit kumar
#include "stdafx.h"
#include "stdio.h"
#include "conio.h"
int main()
{
char *a,*s, v='m';
a=&v;
s=a;
a++;
int intsize=(int)a-(int)s;
printf("%d",intsize);
getch();
return 0;
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How can a process change an environment variable in its caller?
When can you use a pointer with a function?
What is data structure in c and its types?
What is new line escape sequence?
Why we use void main in c?
What is oops c?
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
What is the difference between union and anonymous union?
Explain what are the standard predefined macros?
Explain high-order bytes.
why programs in c are running with out #include
Which is the memory area not included in C program? give the reason
What's the difference between constant char *p and char * constant p?
What are the types of unary operators?
Where can I get an ansi-compatible lint?