How to avoid structure padding in C?
Answer Posted / t swain
by using #pragma you can avoid structure padding.
Is This Answer Correct ? | 18 Yes | 2 No |
Post New Answer View All Answers
#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); }
How does pointer work in c?
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
What is the difference between if else and switchstatement
Is it better to bitshift a value than to multiply by 2?
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
how is the examination pattern?
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
How can you check to see whether a symbol is defined?
Can you add pointers together? Why would you?
Difference between malloc() and calloc() function?
What are the valid places to have keyword “break”?
When can a far pointer be used?
Can you please explain the difference between strcpy() and memcpy() function?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?