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


Please Help Members By Posting Answers For Below Questions

#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }

788


What is ambagious result in C? explain with an example.

2061


Explain the red-black trees?

615


What is %g in c?

641


What functions are used for dynamic memory allocation in c language?

615






What is the use of a semicolon (;) at the end of every program statement?

788


What are lookup tables in c?

554


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

600


string reverse using recursion

1823


How will you print TATA alone from TATA POWER using string copy and concate commands in C?

928


What is pointer to pointer in c?

642


What is c method?

546


What are the 5 types of organizational structures?

558


main() { printf("hello"); fork(); }

705


What is ## preprocessor operator in c?

624