C syntax and other concepts Flashcards

1
Q

named data storage location in computer memory

A

variable

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

2 main categories of data types

A

Integer variables

Floating-point variables

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

variables with decimals

A

Floating-point variables

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

variables with signed and unsigned integers

A

Integer variables

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

3 major scopes rules in c [variable declaration]

A
  1. local variable
  2. formal variable
  3. global variable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

variable declared within a function

A

local variable

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

declared arguments of a function

A

formal variable

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

declared outside all functions

A

global variable

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

2 types of constants

A
  1. literal constant

2. symbolic constant

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

constants that can still be changed during program execution

A

literal constant

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

constants that can still be changed during program execution

A

literal constant

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

symbol that instructs to perform operands

A

operators

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

categories of operators

A
  1. assignment operator
  2. logical operators
  3. mathematical operators
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

operator used for assigning value

A

Assignment operators

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

two kinds of mathematical operators

A
  1. Unary mathematical operators

2. Binary mathematical operators

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

operators that compare expressions

A

Relational operators

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

two types of conditional statements

A
  1. If

2. switch

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

pre-defined loops

A

for loops

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

open-ended loops

A

while and do loops

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

[LOOPS] sets a variable to a specific value

A

initial

18
Q

[LOOPS] usually relational expression that’s when equated to false, the loop terminates

A

condition

19
Q

[LOOPS] skip the current iteration to go to the start of a loop

A

continue

20
Q

[LOOPS] terminates the program execution

A

exit()

20
Q

[LOOPS] terminates the program execution

A

exit()

21
Q

[LOOPS] terminates the program execution

A

exit()

22
Q

[LOOPS] skip past the end of the current loop

A

break

23
Q

[LOOPS] has a label for where a program jumps to after meeting the set condition

A

goto statement

24
Q

increments a variable with initial value

A

increment

25
Q

executable processes

A

statements

26
Q

statement that allows for multiple branches in a single expression

A

Switch statement

27
Q

3 possible things in a format string

A
  1. literal text
  2. escape sequence
  3. conversion specifier
28
Q

characteristics of C language

A
  1. general-purpose programming language
  2. middle-level programming language
  3. system programming language
29
Q

inventor of B language

A

Ken Thompson

30
Q

[Characteristics]

  • data processing application (large volume of data)
  • scientific applications (complex mathematical computations)
A

General-purpose programming language

31
Q

[Characteristics]

- can be used for interface assembly language

A

Middle-level programming language

32
Q

[Characteristics]

- Operating System can be developed using C

A

System Programming Language

33
Q

What C offers? Enumerate the 7.

A
  1. program sequence of instructions (IPO)
  2. conditions
  3. iterations
  4. arrays
  5. functions
  6. file handling
  7. pointers
34
Q

[Bytes]

short and int

A

2 bytes

35
Q

[Bytes]

long int

A

4 bytes

36
Q

[Bytes]

unsigned short and long

A

2 bytes

37
Q

[Bytes]

unsigned long int

A

4 bytes

38
Q

[Bytes]

float

A

4 bytes

39
Q

[Bytes]

double

A

8 bytes

40
Q

[Bytes]

long double

A

10 bytes

41
Q

2 uses of char

A
  1. character definition

2. string definition

42
Q

[Use of Char]

any single letter, digit or number

A

Character definition

43
Q

[Use of Char]

  • collection of characters
  • preceded by “*” or followed by integer value enclosed with “[]”
A

String definition

44
Q

30 char
char name[31]
why is it 31?

A

String terminator for the extra space!