BASIC PROGRAMMING CONSTRUCTS Flashcards

(31 cards)

1
Q

A WINDOW which users can interact with in a system program

A

console

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

Used for user and computer interaction

A

I/O statement

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

write text without adding a newline

A

Console.Write

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

write text and adds a new line

A

Console.WriteLine

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

means combining two strings and returns as a result of a new string

A

concatenation

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

It can be composed of an output text followed by a variable then another output text

A

mixed string concatenation

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

read only single character

A

Console.Read

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

read a line or string

A

Console.ReadLine

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

read the key pressed

A

Console.ReadKey

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

-A programmer-defined word that holds the value of the user

-Also saves a portion of the memory to store a determined value

A

Variables

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

Rules in declaring variables

A
  1. must begin with a LETTER or UNDERSCORE
  2. no blanks allowed
  3. must not be the keywords which are reserved words by the language
  4. must not be given a name with the same name as other functions
  5. they are case sensitive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

(valid or invalid)

D-whiz

A

invalid

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

(valid or invalid)

enjoy

A

valid

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

(valid or invalid)

@boss

A

invalid

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

(valid or invalid)

_10ict

A

valid

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

(valid or invalid)

1st quarter

17
Q

An expression with a fixed value that cannot be changed at runtime

18
Q

what keyword do you use to declare a constant

19
Q

There are ____________ in C# that when preceded by the backslash ( \ ) symbol, have special meaning

A

character constants

20
Q

Used as particular values within the source code of a program

21
Q

Are constant and are also called decimal numerals

Examples:
2354
612
18
29

A

integer literals

22
Q

Are numbers with decimal, fractions, and/or exponents

Examples:
3.14159
6.02e23

A

floating point literals

23
Q

Non numerical constant

A

character and string literals

24
Q

single character [literal]

A

character literal

25
several character [literal]
string literal
26
Can have either a True or False value
boolean literals
27
The type of data that a variable can hold
data type
28
CHARACTERITICS OF A DATA TYPE
Name – value type Size – how much memory they use Default value – the initial value
29
Holds data within its own memory location examples: int i = 42; char ch = ‘A’; bool result = true;
value data type
30
Contain a reference to another memory location that holds the data examples: string str = “Hello”; object obj = 42; byte[] bytes = {1, 2, 3};
reference data type
31
Stores the memory address of another type examples: char* cptr; int* iptr;
pointer data type