write a program for size of a data type without using
sizeof() operator?
Answer Posted / mukesh kumar singh
#include <iostream>
using namespace std;
struct node {
int x;
int y;
char *s;
};
int main()
{
node x,*p;/* here u can change the type */
p=&x;
cout<<"\n\nSize of node Is : "<<(char*)(p+1)-(char*)p;
return 0;
}
Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
Explain what is the advantage of a random access file?
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
i have a written test for microland please give me test pattern
What is the use of a conditional inclusion statement in C?
Why do we use int main?
how to create duplicate link list using C???
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
What is a constant?
How to set file pointer to beginning c?
What is a c token and types of c tokens?
Which built-in library function can be used to match a patter from the string?
What are structure types in C?
Explain the use of #pragma exit?
Explain what is the use of a semicolon (;) at the end of every program statement?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a