Exam 1 (Ch 1 & 2) Flashcards

(71 cards)

1
Q

C# has a set of rules, called ______, that must be followed.

A

Syntax

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

When you use the __________ approach to solving a problem, you break the problem into subtasks.

A

Methodical

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

A(n) _______ is a mock-up of screens depicting the look of the final output.

A

Prototype

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

An object is a(n) ________ of a class.

A

Instance

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

The most important and frequently used ______ is System.

A

Namespace

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

A(n) _________ is a user-supplied or user-created name.

A

Identifier

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

The method _________ is the entry point for all applications. This is where the program begins execution.

A

Main

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

A(n) __________ is a clear, unambiguous, step-by-step process for solving a problem.

A

Algorithm

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

A(n) ________ is a collection of one or more statements combined to perform an action.

A

Method

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

Windows 8, Android, Windows 7, and Linux are types of _______.

A

System software

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

The Framework Class Library (FCL) includes a number of different ________.

A

Namespaces

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

________ marks the end of a block comment.

A

*/

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

Programmers commonly verify that their design is correct by doing a(n) ____.

A

Desk check

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

One of the rules for creating a(n) ________ is to use a combination of alphabetical characters, numeric digits and the underscore character.

A

Identifier

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

_______ are predefined reserved identifiers that have special meaning to the compiler.

A

Keywords

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

Every time you declare a variable in the C# language you are actually _______ a class.

A

Instantiating

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

The _____ data type is a whole number, between a certain range of values, and contains no decimal point.

A

int

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

The _______ data type was added to the language to eliminate the problems of loss of precision in mathematical operations that occurred in previous languages.

A

decimal

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

The _____ is sometimes referred to as the remainder operator.

A

% mod

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

______ operators provide a shortcut way to write assignment statements using the result as part of the computation.

A

Compound

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

The C# category of ______ operators appear at the top of the precedence table with the order of operations.

A

Unary

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

_____ makes a variable temporarily behave as if it is a different type.

A

Cast

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

In order to place a value in memory that cannot be changed, you add the keyword _____ to the declaration.

A

const

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

A megabyte is approximately a(n) _______ bytes.

A

Million

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
\_\_\_\_\_\_ is the universal character-encoding schema that provides a unique number for every character in many different languages.
Unicode
26
A(n) _______ represents an area in the computer memory where a value of a particular data type can be stored. When you declare a(n) \_\_\_\_\_\_\_, you allocate memory for that data item in your program.
Variable
27
When naming local variable identifiers and parameters, use \_\_\_\_\_\_\_\_\_.
Camel case
28
All programs consist of at least one \_\_\_\_\_\_.
Main
29
One option to holding the screen at the end of a program is to invoke Console.Read(). Another option is to call \_\_\_\_\_\_\_. It obtains the next character or function key from the user.
readKey();
30
C# is an object-oriented language as such all the code that you write has to be placed in a(n) \_\_\_\_\_.
Class
31
Software consists of programs, which are sets of instructions telling you how to use the computer. True or False
False
32
The first step in the program development process is
Analysis
33
Comments are considered instructions to the computer. True or False
False
34
moreData = true; An error will be produced when moreData is assigned the boolean variable shown above because the keyword true should be enclosed in double quotation marks. True or False
False
35
An appropriate identifier used to store the total transaction amount is total$Amount. True or False
False
36
Classes, methods, namespaces, and properties follow the Pascal case naming convention, which indicates that the first letter in the identifier is lowercase and the first letter of each subsequent concatenated word is capitalized. True or False
False
37
An int variable would be the most appropriate type for a memory location that will be used to store the monthly membership dues for the computer club. True or False
False
38
The decimal equivalen for 3.42e-5 in scientific notation is .00342 True or False
False
39
The result of 25 % 4 is 6.25. True or False
False
40
The result of "123" + "321" is "123321" True or False
True
41
If aNumber is declared to be of type int with a value of 50, Console.out.WriteLine(aNumber++); displays 51. True or False
False
42
C# allows you to mix numeric integral types and floating-point types in an expression. True or False
True
43
The value $78,888.90 is printed as output when the {1:c) format specifier is used in the following Write statement: Console.Write("{0:c}", 78888.894 True or False
False
44
The binary value for ten is 00001010 True or False
True
45
The number 11111111 in binary is equivalent to the number 255 in decimal True or False
True
46
Base 16, also called the octal numbering system, uses powers of sixteen. True or False
False
47
Hexadecimal uses the symbols 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, G. True or False
False
48
With only eight bits, you can represent 2or 256 different decimal values. True or False
True
49
Unicode includes representation of 28 or 256 unique characters. True or False
False
50
A machine that has a 64-bit processor can process 64 characters at one time. True or False
False
51
Give examples of data types.
Int, double, string, char
52
Which data type is used to store whole numbers?
int
53
Which data type would you use to store the amount of money it costs for your lunch?
double
54
Declare a memory location to store your GPA
double gpa
55
Show how you would declare a memory location called amount to be of double type with a compile-time initialization fo four dollars and 2 cents.
double amount = 4.02;
56
Show how you would declare a memory location to store the name of your high school.
string nameOfSchool;
57
Show how you would declare a memory location to contain the number of pages in a book and do a compile time initialization of it with a value of 865.
int numberOfPages = 865;
58
The characters T and F are used to represent binary digits. True or False
False
59
A hard dtive that holds 3 gigabytes will store more data than one that holds 10 megabytes. True or False
True
60
\_\_\_ bits make up one byte.
8
61
\_\_\_\_ is used to mark the beginning of an inline comment.
//
62
\_\_\_ is used to mark the beggining of a multiline comment.
/\*
63
A computer machine that has a 32-bit processor with 512 megabytes of RAM could store approximately _____ alphabetic characters in RAM.
512 million
64
ReadKey() is a \_\_\_\_
Method
65
The Write() program statement is added to hold the screen. True or False
False
66
The Main() method must be placed at the beginning of a program. True or False
False
67
A forward slash followed by and asterisk /\* marks the beginning of an inline comment. True or False
False
68
Program statements are called \_\_\_\_\_
Source code
69
Misspelling a name or forgetting to end a statement with a semicolon are examples of _____ errors.
Syntax
70
We are currently in the ____ generation of modern computing.
5th
71
IDE stands for Integrated Development Environment. True or False
True