Explain the difference between struct and union.
Answers were Sorted based on User's Feedback
Answer / nashiinformaticssolutions
• Struct: All members occupy separate memory.
• Union: All members share the same memory.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / glibwaresoftsolutions
• Struct: All members occupy separate memory.
• Union: All members share the same memory.
| Is This Answer Correct ? | 0 Yes | 0 No |
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
What is Generic pointer? What is the purpose of Generic pointer? Where it is used?
What is 2 d array in c?
int array[]={1,2,3,4,5,6,7,8}; #define SIZE (sizeof(array)/sizeof(int)) main() { if(-1<=SIZE) printf("1"); else printf("2"); }
Where does the name "C" come from, anyway?
declare afunction pointer to int printf(char *)?
what are two kinds of java
3. When do you say that a digraph is acyclic A)if and only if its first search does not have back arcs B)a digraph is acyclic if and only if its first search does not have back vertices C)if and only if its first search does not have same dfnumber D)None of these
What is chain pointer in c?
What is the use of #define preprocessor in c?
What are the difference between a free-standing and a hosted environment?
What is the output of following program ? int main() { int x = 5; printf("%d %d %d\n", x, x << 2, x >> 2); }