Computer Science Flashcards

1
Q

What is a program made up?

A

Variable, keyword, operator, punctuation, Data Types,

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Variable?

A

Variable names are just the symbolic representation of a memory location.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a keyword?

A

Keywords are the reserved words used in programming. Each keywords has fixed meaning and that cannot be changed by user.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a Arithmetic operator?

A

Operators are the symbol which operates on value or a variable. For example: + is a operator to perform addition.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a data type?

A

Data types are the keywords, which are used for assigning a type to a variable.
Integer types
Floating Type
Character types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the three primary activities of a program?

A

Input, processing and output

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a input?

A

Input is information a program collects from the outside world

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is processing?

A

Performing process on information gathered from input.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a output?

A

Output is information a program shows the outside world.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The Programming process?

A

Steps, which include design, testing, and debugging activities.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is Procedural and Object-Oriented Programming?

A

Two ways of thinking about software development and program design.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what is Procedural Programming?

A

Programmer constructs functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what is Object-Oriented Programming?

A

Programming element that contains data and the procedures that operate on the data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what are The Parts of a C++ Program

A

Comments, #preprocessor directives, namespace, function, { , strings,
return 0,

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what is cout object?

A

This object will display information on the computers screen.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what is a #include Directive?

A

causes the contents of another file to be inserted into the program.

17
Q

what are Literals?

A

constant value assigned to variable

18
Q

what are Identifiers?

A

identifiers are names given to variables, functions.

19
Q

Integer data types?

A

Keyword int is used for declaring the variable with integer type.
either 2 bytes(In older PC’s) or 4 bytes.

20
Q

The char Data Type?

A

The size of char is 1 byte. Keyword char is used for declaring the variable of character type.

21
Q

Floating-Point Data Types ?

A

Floating types can hold real values (numbers)

22
Q

size of float ?

A

precision of float 6 digits

23
Q

size of double?

A

precision of double is 14 digits.

24
Q

what happens if assign float to int

A

3.9999 = 3 rounded down

25
Q

what is bool Data Type?

A

two values (usually denoted true and false)

26
Q

Variable Assignments and Initialization

A

assign values to variables and once its in its initialized

27
Q

every variable has a scope, what are scopes?

A

scope are rules where variable may be used.

28
Q

Mathematical Expressions ordinance

A

negative, * , / , % , +, -

29
Q

Operator Data type Ranking

A

long double, double, float, unsigned, long, long, unsigned int, int. lower type get converted to higher type.

30
Q

Relational Operators

A

compare numeric value, and char values. > .< = !=

31
Q

if…else statement.

A

if (test expression)
statements to be executed if test expression is true;
else
statements to be executed if test expression is false;

32
Q

Flags

A

a boolean flag is a variable that get the value of either true or false

33
Q

Logical Operators

A

The logical operators, logical AND (&&) and logical OR (||), are used to combine multiple conditions formed using relational or equality expressions.

34
Q

Menus

A
showChoices();
		cin >> choice;
		switch (choice)
		{
		case 1:
			cout << "Enter two numbers: ";
			cin >> x >> y;
			cout << "Sum " << add(x,y) <<< "Enter two numbers: ";
			cin >> x >> y;
			cout << "Difference " << subtract(x,y) <<endl;
			break;
35
Q

Validating User Input

A

are the options for user real?

36
Q

The while Loop

A

Loops causes program to execute the certain block of code repeatedly until some conditions are satisfied, i.e., loops are used in performing repetitive work in programming.

while (test expression)
{
statements to be executed.
}