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

The while Loop

The while Loop

The while statement is also used for looping. Unlike the situation with the for statement, there is only one expression field in the while statement.

The general form of the while statement is

while (expression) {

Question and Answer

Question and Answer

    Q How does a for loop work?

Exercises : Answer the following Question

To help you solidify your understanding of this hour's lesson, you are encouraged to try to answer the quiz questions and finish the exercises provided in the Workshop before you move to the next lesson.

 

Working with the Cast Operator

Playing with the Cast Operator

In C, you can convert one data type to a different one by prefixing the cast operator to the operand.

The general form of the cast operator is

(data-type)x

Question and Answer

Question and Answer

    Q What is the difference between the pre-increment operator and the post-increment operator?