Karteikarten
2.2- Programming Fundamentals

Karten in diesem Stapel (17)
- 1Define variable.A value stored in memory that change while the program is running.
- 2Define constant.A value that does not change while the program is running, and is assigned when the program is designed.
- 3Define assignment.Giving a variable or constant a value.
- 4What is casting?Converting a variable from one data type to another (integer to string).
- 5What are the advantages of constants?

- 6Why is casting required?Convert string to integer so that ALU can carry out calculations. Also, using integers are memory efficient as they require less bits of memory.
Some commands also require data in a particular data type. - 7Recall the 4 data types.

- 8Describe a sequence.Executing one instruction after another in a program.
- 9Name the three programming constructs.Selection, Iteration, Sequence
- 10Describe selection and give an example.program branching depending on a condition.

- 11What is the switch/select case statement? give an example.A program can branch in more than directions depending on the value of a variable.
entry is variable A, B,C or D (case tries to match entry)
- 12Define iteration.Repeating sections of code.
- 13What is a FOR loop?Also known as counter controlled loop, it is used when the number of iterations needed are known ahead of the iteration executing.

- 14What is a WHILE loop?Also known as a condition controlled loops, they are used when the number of iterations is not known because the variable used to determine when the iteration ends is changing within iteration itself.

- 15Recall common arithmetic operators (7).

- 16Recall common comparision operators.

- 17Recall string manipulation commands.

Informationen
- Beschreibung
- Karteikarten am 2.2- Programming Fundamentals , erstellt von K B am 30/10/2021.
- Erstellt von
- K B
- Aufrufe
- 0
- Bewertung