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
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
What is a function in c?
How can you find the day of the week given the date?
How do we print only part of a string in c?
How do I send escape sequences to control a terminal or other device?
Explain what is gets() function?
a c code by using memory allocation for add ,multiply of sprase matrixes
C language questions for civil engineering
Why cant I open a file by its explicit path?
Which control loop is recommended if you have to execute set of statements for fixed number of times?
What is calloc() function?
What are qualifiers in c?
In C language what is a 'dangling pointer'?
Can an array be an Ivalue?
Can a variable be both constant and volatile?