Presentation is loading. Please wait.

Presentation is loading. Please wait.

Review Data type is a specific set of data values along with a set of operations on those values. *

Similar presentations


Presentation on theme: "Review Data type is a specific set of data values along with a set of operations on those values. *"— Presentation transcript:

1 Review Data type is a specific set of data values along with a set of operations on those values. *

2 Review name and define the data type that can be stored in each variable. Declaration statements

3 Review Integral char int enum Name several data types:
Floating point float double long Integral char int enum Name several data types: Structured array struct union class Address pointer reference * * *

4 Review is a location in RAM, referenced by an identifier. Where the program stores a value and from which the program can later retrieve that value. Variable *

5 Review is a value which doesn’t change. literal or “yes” or ‘Q’ symbolic PI = Constant *

6 Review Syntax of a declaration:
semicolon simple: data-type variable name; compound: data-type var1, var2, var3; commas

7 Review An operator is a symbol that causes the compiler to take an action. operator *

8 Review The modulus operator yields the remainder of integer division.
order of operations: modulus operator order of operations: P E M D% A S from left to right * * *

9 Review Operator overload means that the same operator will behave differently depending upon the operands. In mixed-mode, floating point takes precedence. Operator overload * *

10 Review What is the assignment operator and what does it do?
The assignment operator (=)causes the operand on the left to take on the value to the right side of the statement. This operator assigns from right to left.

11 Review What is the output? 1. double pay_rate, inc; 2. cout << pay_rate << ‘\t’ << inc << ‘\n’; 3. pay_rate = 6.25; 4. inc = 0.1; 5. cout << pay_rate << ‘\t’ << inc << ‘\n’; 6. pay_rate = pay_rate*(1 + inc); 7. cout << pay_rate << ‘\t’ << inc << ‘\n’; 2. %&^$ * * *

12 Review What is cout? predefined stream object Where is is found?
in iostream.h in standard C++ library What does it do? used with insertion operator (<<) to send data to the standard output device * * * * * *

13 Review iomanip.h contains the objects which have special effects on the iostream. Give examples of these objects. setw(n) setprecision(n) setiosflags(ios::fixed) Found in standard C++ library iomanip.h * * * *

14 T h e E n d “So we went to Atari and said, ‘Hey, we’ve got this amazing thing, even built with some of your parts, and what do you think about funding us? Or we’ll give it to you. We just want to do it. Pay our salary, we’ll come work for you.’ And they said, ‘No.’ So then we went to Hewlett-Packard, and they said, ‘Hey, we don’t need you. You haven’t got through college yet.” Apple’s founder Steve Jobs on attempts to get Atari and H-P interested in his and Steve Wozniak’s personal computer.


Download ppt "Review Data type is a specific set of data values along with a set of operations on those values. *"

Similar presentations


Ads by Google