struct ptr
{
int a;
char b;
int *p;
}abc;
what is d sizeof structure without using "sizeof" operator??
Answer Posted / kk
12 is answer
int a takes 4 bytes
char b takes 4 bytes due to data padding
int *p any pointer takes 4 bytes
so totally 12 bytes........
Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Explain what is the difference between a free-standing and a hosted environment?
What is static identifier?
Explain what is the benefit of using enum to declare a constant?
What is c token?
Is c programming hard?
What are the different types of data structures in c?
Explain the use of keyword 'register' with respect to variables.
Explain what happens if you free a pointer twice?
Where static variables are stored in c?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
What is use of #include in c?
What is scope of variable in c?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
What are pointers really good for, anyway?
What is a macro?