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: Pointers (b)


General Questions

1. address

2. %p

3. hex


White Box Testing

1. two errors:

  • line 2 should end with )
  • in line 7, change %c to %p

2. two errors:

  • in line 4, the variable should be long instead of int
  • in line 7, change %d to %ld

3. two errors:

  • in line 4, the variable should be double instead of int
  • in line 7, change %d to %f
Copyright
© 2001
Kristin Switala
Hosted by www.Geocities.ws

1