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. Can getch() be used to echo the input

  • Yes
  • No

2. What will be output of
#include
void main()
{
char test =`S`;
printf("\n%c",test);
}

  • S
  • Error
  • Garbage value
  • None of above

3. Continue statement used for

  • To continue to the next line of code
  • To stop the current iteration and begin the next iteration from the beginning
  • To handle run time error
  • None of above

4. Which is invalid name of identifier

  • world
  • addition23
  • test_name
  • factorial

5. Which operator has the highest priority

  • ()
  • []
  • *
  • /
Read more from - C Programming Questions Answers - Chapter 1