Chapter 3. DATA AND C

I l @ ve RuBoard

Chapter 3. DATA AND C

You will learn about the following in this chapter:

  • Keywords

     int, short, long, unsigned, char, float, double 
  • Operator

     sizeof 
  • Function

     scanf() 

In this chapter, you learn about the basic data types that C uses and about the distinctions between integer types and floating-point types. You practice writing constants and declaring variables of those types. You begin studying how to use the printf() and scanf() functions to read and write values of different types.

Programs work with data. You feed numbers , letters , and words to the computer, and you expect it to do something with the data. For example, you might want the computer to calculate an interest payment or display a sorted list of vintners. In this chapter, you do more than just read about data; you practice manipulating data, which is much more fun.

This chapter explores the two great families of data types: integer and floating point. C offers several varieties of these types. You learn what the types are, how to declare them, how to use them, and when to use them. Also, you discover the differences between constants and variables, and as a bonus, your first interactive program is coming up shortly.

I l @ ve RuBoard


C++ Primer Plus
C Primer Plus (5th Edition)
ISBN: 0672326965
EAN: 2147483647
Year: 2000
Pages: 314
Authors: Stephen Prata

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net