CHAP 3 INTRO TO C++ Flashcards
(33 cards)
The % operator may appear ONLY with [ ] values.
integer
positive or negative integers with or without a sign. (commas are not allowed)
int (integer)
unlike the output statement which may contain constants, variables or more complicated expressions, the only items that may be specified in an input statement are the names of one or more variables.
true or false
true
C++ allows operators to be combined for a [ ] . Many environments discourage the use of operators in this way as it can make a program more difficult to read and understand.
short-hand notation
combined operators
main function
{
variable declarations
executable statements
}
general form of cout
cout«_space;ExprOrString «_space;ExprOrString ā¦
true of false
bool
use the current value of n in the expression and when finished, increment/decrement n.
N++
Nā
POSTfix
types of identifiers
Letters (LOWERCASE/UPPERCASE)
DIGITS (0-9)
THE UNDERSCORE ( _ ) CHARACTER
the process of implementing the algorithm using a language the computer can understand
computer programming
causes the cursor to move to the beginning of the next line. This is one way to get blank lines in your output.
šššš (end line)
is a predefined variable in C++ that indicates you are going to input a stream of characters from an input device ([ ] is associated with the standard input device which is the keyboard).
cin»_space;
information of the program needs (a list of all necessary header files used in the program).
preprossesors directives
A set of valid data values along with the operations that may be performed on those values.
data types
positive or negative numbers containing an integer part and a fractional part with a decimal point in between.
float/double
{
//Executable Statements
ā®
return 0;
}
main function
where can you find the values of uppercase and lowercase letters and numbers?
ASCII Table
a set of characters used to hold data containing more than one character enclosed in double quotes.
string
true or false
you can have an identifier like this :
123ABc
false
When expressions are evaluated, they are evaluated left to right according to the following precedence rules:
( )
* / %
+ -
assignment statement:
syntax: variable = expression;
int main ( )
heading
is a set of special words, symbols and rules for constructing a program. There are many programming languages each with their own set of rules.
programming language
increment/decrement the contents of n and use the new value of n in the expression.
++N
āN
PREfix