Diff: between this 2 classes in terms of memory
class A
{
int i;
char c;
double d;
};
class A
{
double d;
int i;
char c;
};
How it is calculating?
Answer / ashponni
Is the memory for double is assigned to int and char?
| Is This Answer Correct ? | 3 Yes | 8 No |
Can a file other than a .h file be included with #include?
How can I run c program?
Can you please explain the difference between exit() and _exit() function?
What is a pointer in c plus plus?
Explain what is the difference between null and nul?
How can I implement opaque (abstract) data types in C? What's the difference between these two declarations? struct x1 { ... }; typedef struct { ... } x2;
What is meant by errors and debugging?
How can I determine whether a machines byte order is big-endian or little-endian?
Write a c program using for loop in switch case?
List a few unconditional control statement in c.
Difference between data structure and data base.
7 Answers CTS, Value Labs, Zoho,
typedef struct { int i:8; char c:9; float f:20; }st_temp; int getdata(st_temp *stptr) { stptr->i = 99; return stptr->i; } main() { st_temp local; int i; local.c = 'v'; local.i = 9; local.f = 23.65; printf(" %d %c %f",local.i,local.c,local.f); i = getdata(&local); printf("\n %d",i); getch(); } why there there is an error during compiling the above program?