O'Reilly logo

C Primer Plus, Fourth Edition by Stephen Prata

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Review Questions

You'll find answers to the review questions in Appendix A, “Answers to Review Questions.”

1:What are the basic modules of a C program called?
2:What is a syntax error? Give an example of one in English and one in C.
3:What is a semantic error? Give an example of one in English and one in C.
4:Indiana Sloth has prepared the following program and brought it to you for approval. Please help him out.
include studio.h
int main{void}  /* this prints the number of weeks in a year /*
(
int s

s := 56;
print(There are s weeks in a year.);
return 0;
5:Assuming that each of the following examples is part of a complete program, what will each one print?
  1. printf("Baa Baa Black Sheep.");
    printf("Have you any wool?\n");
    
  2. printf("Begone!\nO creature ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required