Site Sections => About Us | Consultancy | Training | Software | Publications | Open Source | Support | Open Standards | FAQ | Jobs
Site Style Info

6.9. Exercises

Exercise 6.1. What is the declaration of an untagged structure containing two ints called a and b?

Exercise 6.2. Why is such a declaration of limited use?

Exercise 6.3. What would the structure look like with a tag of int_struc and two variables called x and y of the structure type being defined?

Exercise 6.4. How would you declare a third variable later, with the the same type as x and y but called z?

Exercise 6.5. Assuming that p is the right type of pointer, how would you make it point to z and then set z.a to zero, using the pointer?

Exercise 6.6. What are the two ways of declaring a structure with incomplete type?

Exercise 6.7. What is unusual about a string "like this" when it's used to initialize a character array?

Exercise 6.8. What if it initializes a char *?

Exercise 6.9. Find out what a doubly linked list is. Reimplement the linked list example using one. Is it any easier to insert and delete elements in a doubly linked list?

The C Book

This book is published as a matter of historical interest. Please read the copyright and disclaimer information.

GBdirect Ltd provides up-to-date training and consultancy in C, Embedded C, C++ and a wide range of other subjects based on open standards if you happen to be interested.


West Yorkshire Office

GBdirect Ltd
Bradford Design Exchange
34 Peckover Street
BRADFORD
BD1 5BD
West Yorkshire
United Kingdom

consulting@gbdirect.co.uk

Training: 0800 651 0338
General: +44 (0)870 200 7273
Finance: +44 (0)1353 615 174

Please call between 0900 and 1700 (UK time) on Monday to Friday


South East Regional Office

GBdirect Ltd
18 Lynn Rd
ELY
CB6 1DA
Cambridgeshire
United Kingdom

consulting@gbdirect.co.uk

Training: 0800 651 0338
General: +44 (0)870 200 7273
Finance: +44 (0)1353 615 174

Please call between 0900 and 1700 (UK time) on Monday to Friday


Please note:
Non-training enquiries should be directed, initially, to our UK national office in Bradford (West Yorkshire), even if the enquiry concerns services delivered in London or South/East England. Clients in London and the South East will typically be handled by staff working in the London or Cambridge areas.