Question Detail

Difference between structure and union is

  • We can define functions within structures but not within a union
  • We can define functions within union but not within a structure
  • The way memory is allocated
  • There is no difference
Similar Questions :

1. Which operator in c can't be overloaded

  • %
  • +
  • ::
  • -

2. A variable in c

  • must have a valid datatype
  • can't have a name same as keyword
  • must have a name starting with a character
  • All of above

3. Break statement is used for

  • Quit a program
  • Quit the current iteration
  • Both of above
  • None of above

4. Structures can be used

  • to hold different datatypes
  • have pointers to structures
  • to assign to one another
  • all of above

5. Adding to a pointer that points to an array will

  • Cause an error
  • Increase the value of the element that the pointer is pointing to
  • Cause the pointer to point to the next element in the array
  • None of above
Read more from - C Programming Questions Answers - Chapter 1