Keywords Flashcards

0
Q

Local Variable

A

A variable that is created when the class is first called.

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

Static Variable

A

A variable that has had a memory location allocated for the entire lifetime of the run of the program.

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

Sequence

A
  • The order in which software instructions are carried out.

* instructions are carried out in the order they appear.

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

Function/Method

A
  • A common sequence of instructions.
  • Can be declared as void where a return value is not required.
  • If a return value is required, it’s type must be defined.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Loop

A

Allows a statement or group of statements to be executed more than once.
Repeats a set number of times or until a condition has been met.

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

Unconditional Repitition

A

The number of repititions is unknown.

Eg for loop

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

Conditional Repition

A

The number of repetitions is known.

Eg while loop

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

Selection

A

In a program it is possible to decide which statements to execute.
IE if or switch statement.

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

If Statements

A

Allows control to branch to the execution of a set of instructions only if the condition evaluates to be true.

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

If/Else Statements

A

Same as if statement but will include statements to be executed if the evaluation of the condition is FALSE.

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

For Loop

A

The counter is initialised.

The end value for the counter is declared and the increment for the counter set.

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

do While Loop

A

Same as while loop.
Executes at least one time.
Executes first then checks for specified loop condition.

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

Nested Loop

A

A loop within a loop.

Used for more complex problems.

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

Switch Statements

A

Allows multiple decisions to be affected. If relevant result in more efficient code than multiple IF statements.

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

Switch- case statement

A

Control is transferred to the case statement which matches the switch variable.

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

Switch-break

A

Execution proceeds until break statement transfers control out of switch structure.
A branch statement usually required after each case block unless case has no code.

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

Console Application

A

A command driven interface which takes input and displays output at a command line console with access to 3 basic data streams.
•standard input
•standard output
•standard error

17
Q

Windows Form Application

A

A window called a form is used. Objects are added to it. GUI is used to design form.

18
Q

namespace

A

Used to declare a scope that contains and stores a set of related objects.
Can be used to organise code elements and store classes and subsequently methods.

19
Q

class

A

Enables programmer to create custom types by grouping together variables of other types.

20
Q

CamelCase

A

The first letter in a compound word is capitalised.

Most languages do not allow the use of spaces in the names of functions or variables.

21
Q

assignment statements

A

Carry out assignment operations.

Consist of taking value on the right side of the operator (=) and storing it in the element on the left.

22
Q

Instantiate

A

Declaring a variable in C#.

Creating an instance in which data is stored.

23
Q

Method

A

A code block that contains a series of statements.

A program causes the statements to be executed by calling the method and specifying any required method arguments.

24
Q

Intelligence

A

Provides logical code elements that can be selected from a drop down menu while writing the code.
Reduces time typing.
Avoid typographical errors.

25
Q

Concatenation

A

Join two things together.
Direct text with variables.
Two or more variables to make a longer string.

26
Q

Implicit conversion/ coercion

A

The compiler will automatically convert from one data type to another data type.
Defined I language core by language vendor.

27
Q

Explicit Conversion

A

Explicitly defined within the code of the developer rather than being completed by the runtime.

28
Q

Compiler

A

Software that converts programming language into machine code so that the PC can understand the program.

29
Q

Variable

A

Refers to memory address.

Creates and hold a space in the memory that is used for storing temporary data.

30
Q

Value Types

A

Value types are passed to methods by passing an exact copy of the data.
Eg primitive types such as int, float, bool and char.

31
Q

Reference Types

A

An object is created in memory and the runtime deals with a reference to the object in memory.

32
Q

Arithmetic Operators

A
    • Add numbers
    • Subtract numbers
    • Multiply numbers
  • / Divide numbers
  • % Divide two numbers and returns remainder
33
Q

Assignment Operators

A
= Equal to
\+= plus equal to
-= minus equal to
*= multiply equal to
/= divide equal to
%= Modulus (divide to numbers and return remainder) equal to
34
Q

Unary Operators

A

Used for increment or decrement value by 1.

35
Q

Increment Operator

++

A
  • Pre-increment (i++) - increments by 1 the loop executed.

* Post-increment (++I) - loop executed then increments by 1

36
Q

Decrement

A
  • Pre-decrement (i++) - increments by 1 the loop executed.

* Post-decrement (++I) - loop executed then increments by 1

37
Q

Comparison Operators

A
< Less than
> Greater than
= Greater than or equal to
== equal equal to
!= not equal to
38
Q

Logical Operator

A

• && Operator - and operator. Returns true if both or all condition is true false if any condition is false.
• || Operator - or operator. Returns true or false based on condition. One matches returns true. Otherwise all false.
• ! Operator - not operator. Returns true if expression is false.
^ Operator - xor operator. Returns false if both or all the expression returns true/false.

45
Q

While Loop

A

A condition is tested at the start or the end of the loop. Loop is repeated while condition is met.
(Don’t know the starting point of loop/Run infinite loop/terminates with special character.