struct ptr
{
int a;
char b;
int *p;
}abc;
what is d sizeof structure without using "sizeof" operator??
Answer Posted / gagandeep
The total size would be 5.
Since 'int a' takes 2;
'char b' takes 1; and
'int *p' takes 2 (Note: Any pointer variable would take 2 bytes)
There is no additional size of 'struct' data structure.
Hence 5 is the value.
| Is This Answer Correct ? | 12 Yes | 10 No |
Post New Answer View All Answers
a c code by using memory allocation for add ,multiply of sprase matrixes
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
Is void a keyword in c?
Why main is not a keyword in c?
What is dynamic memory allocation?
What is the difference between variable declaration and variable definition in c?
What does printf does?
Explain the difference between call by value and call by reference in c language?
Write a program for finding factorial of a number.
What are the benefits of c language?
How do we make a global variable accessible across files? Explain the extern keyword?
Why main function is special give two reasons?
Is c is a middle level language?
How can a program be made to print the name of a source file where an error occurs?
What are the disadvantages of c language?