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: Conditionals (a)


General Questions

1. the condition, if the condition is met, and if the condition is not met

2. a conditional inside a conditional


White Box Testing

1. two errors:

  • line 8: you should add a space before the %c
  • in line 9, use double equal signs ==

2. two errors:

  • in line 6, add an ampersand before the variable: &year
  • after line 12, you need two closing curly braces, not just one
Copyright
© 2001
Kristin Switala
Hosted by www.Geocities.ws

1