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
How old is c programming language?
please give me some tips for the placement in the TCS.
What is table lookup in c?
Write a program to check whether a number is prime or not using c?
Explain enumerated types in c language?
int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above
What is the size of structure in c?
Explain do array subscripts always start with zero?
Explain how do you determine whether to use a stream function or a low-level function?
How can I prevent another program from modifying part of a file that I am modifying?
If errno contains a nonzero number, is there an error?
How can I swap two values without using a temporary?
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
Why we use void main in c?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?