Learn How to Program in Cby Dr. Kristin Switala
|
|
Review: Strings (a)
Instructions: Think about each question and write the answer in your notebook.
White Box Testing
1. Fix the errors in this C source code. There are 2 errors.
|
#include<stdio.h>
void main( )
{
char name[8] = "Angelle Seeling";
printf("The world's fastest woman on two wheels is %c.", name);
}
|
2. Fix the errors in this C source code. There are 2 errors.
|
#include<stdio.h>
void main( )
{
char cyclists[3][40] = {
{"Carl Fogerty"},
{"Kenny Roberts, Jr."},
{"Angelle Seeling"},
{"Jeremy McGrath"}
printf("%s is the king of Supercross.\n", cyclists[3]);
printf("%s is the queen of drag racing.", cyclists[2]);
}
|
|
|