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 |
What is the Lvalue and Rvalue?
int i=10; printf("%d %d %d", i, i=20, i);
List the difference between a "copy constructor" and a "assignment operator"?
main() { float f1=10.5; double db1=10.5 if(f1==db1) printf("a"); else printf("b") }
main() { char as[] = "\\0\0"; int i = 0; do{ switch( as[i++]) {case '\\' : printf("A"); break; case 0 : printf("B"); break; default : printf("C"); break; }} while(i<3); }
4 Answers Vector, Vector India,
What is header file in c?
What is linear search?
what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above
Explain what will the preprocessor do for a program?
What is the use of #include in c?
main() { int a,b; printf("%d,%d",scanf("%d%d",&a,&b)); } => do u mean above program's output... =>output will be:2,whatever you enter value for b. =>because scanf is a library fn which will return how many arguements it processes, and second value you are right mr.Satya but i found my self unable to understand that for the first time scanf returns the no of successful matches but how for the second time it returns the value of 'b'.while a function should return the same 'r' value every time.
What is integer constants?