Learn How to Program in C

by
Dr. Kristin Switala

Introduction

Directives

Variables

Conditionals

Loops

Arrays

Pointers

Strings

Functions

Structures


Site Map

Answers to Review: Arrays (d)


White Box Testing

1. three errors:

  • all three errors are in line 7, which should be:
  • printf("Each distance occupies %d bytes of memory.", sizeof(distances[0]));

2. three errors:

  • all three errors are in line 6, which should be:
  • int k = sizeof(apt)/sizeof(apt[0]);
Copyright
© 2001
Kristin Switala
Hosted by www.Geocities.ws

1