Exercises : Answer the following Question

Submitted by tushar pramanick on Mon, 02/25/2013 - 11:19

Workshop
To help solidify your understanding of this hour's lesson, you are encouraged to answer the quiz questions provided in the Workshop before you move to the next lesson. The answers and hints to the questions are given in Appendix E, "Answers to Quiz Questions and Exercises."

 

Quiz

  • What are the lowest-level and highest-level languages mentioned in this book?
  • Can a computer understand a program written in C?What do you need to translate a program written in C into the machine-understandable code (that is, binary code)?
  • If needed, can a C program be reused in another C program?
  • Why do we need the ANSI standard for the C language?

 

 

 

Summary

In this Chapter you've learned the following:

  • C is a general-purpose programming language.
  • C is a high-level language that has the advantages of readability, maintainability, and portability.
  •  C is a very efficient language that allows you to get control of computer hardware and peripherals.
  •  C is a small language that you can learn easily in a relatively short time.
  •  Programs written in C can be reused.
  • Programs written in C must be compiled and translated into machine-readable code before the computer can execute them.
  • C provides many programming languages, such as Perl, C++, and Java, with basic concepts and useful features.
  • The ANSI standard for C is the standard supported by all C compiler vendors to guarantee the portability of C.
  • You can use any C compilers that support the ANSI standard and compile all C programs in this book.

Related Items

Using the Precision Specifier

Using the Precision Specifier

Aligning Output

Aligning Output
As you might have noticed in the previous section, all output is right-justified. In other words, by default, all output is placed on the right edge of the field, as long as the field width is longer than the width of the output.

 

Adding the Minimum Field Width

Adding the Minimum Field Width

Converting to Hex Numbers

Converting to Hex Numbers

Revisiting the printf() Function

Revisiting the printf() Function

The printf() function is the first C library function you used in this book to print out messages on the screen. printf() is a very important function in C, so it's worth it to spend more time on it.