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
How is a pointer variable declared?
How can you draw circles in C?
How does normalization of huge pointer works?
What are the 5 types of organizational structures?
Can we change the value of #define in c?
What is the symbol indicated the c-preprocessor?
How can a process change an environment variable in its caller?
What is auto keyword in c?
What is the difference between near, far and huge pointers?
show how link list can be used to repersent the following polynomial i) 5x+2
What are pragmas and what are they good for?
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
What is the total generic pointer type?
write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34
Sir i need notes for structure,functions,pointers in c language can you help me please