The greatest mistake you can make in life is to be continually fearing you will make one

Wednesday 12 May 2010

Questions on Structures

  1. What is a structure?
  2. How to access structure members?
  3. How to access the variable x in the following structure?
      struct s1{ struct { struct { int x; }s2 }s3 }s;
  4. Can structure contain pointer to itself?
  5. Difference between Structure and Unions?
  6. Difference between Structure and Arrays?
  7. How are structure passing and returning inplemented by compiler?
  8. How can we check whether contents of two structure variables are same or not?
  9. How can we read/write from/to data files?
  10. What are the similarities between structure,union and enumeration?
  11. Define bitfields?What is the use of bitfields in structure declaration?
  12. What are the advantages of using Structure?
  13. How will you pass a structure to a function?
  14. How will you pass an array of structures to a function?
  15. Is there any way to compare two structures automatically?
  16. Why we cannot use relational and logical operators in structure variable?
  17. 20 floats are to bestored in memory.What would you prefer,an array or a structure?
  18. state true or false for the following
    1. All structure elements are stored in contiguous memory locations
    2. In an array of structures,not only are all structures stored in contiguous memory locations,but the elements of individual structures arealso stored in contiguous locations.

    No comments:

    Post a Comment