Google
 
Webcprogramming.com




An Affiliate of AIHorizon




Quiz 7: Structures

If you haven't already done so, be sure to read through Cprogramming.com's tutorial on Structures. Otherwise, best of luck with the quiz!

1. Which of the following accesses a variable in structure b?
A. b->var;
B. b.var;
C. b-var;
D. b>var;

2. Which of the following accesses a variable in a pointer to a structure, b?
A. b->var;
B. b.var;
C. b-var;
D. b>var;

3. Which of the following is a properly defined struct?
A. struct {int a;}
B. struct a_struct {int a;}
C. struct a_struct int a;
D. struct a_struct {int a;};

4. Which properly declares a variable of struct foo?
A. struct foo;
B. struct foo var;
C. foo;
D. int foo;


Answer Key
Next lesson: Lesson 8, arrays


Bookmark and Share

-----
Subscribe to cprogramming.com by Email
Interested in advertising with us?
Please read our privacy policy.
Copyright © 1997-2009 Cprogramming.com. All rights reserved.