C Basics Flashcards

1
Q

main()

A

Identity of the start of the program, with every C program having a main().
main is a C keyword, and should not be used for any other variable.

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

Statements

A

A specification of an action to be taken by the machine as the program executes, with each one ending with a semicolon.

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

Identifiers

A

Words used to represent certain program entities.
Example include:
int my_int;
Void CalulateArea (int radius)
The first one represents a program variable, the second represents a function name.

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

Rule for identifiers

A
  • can contain mix of characters and numbers
  • cannot start with number
  • must start with letter or underscore
  • cannot contain arithmetic operations
  • cannot contain a space
  • cannot be any other punctuation marks
  • cannot be reserved keywords
  • case sensitive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Integers

A

Positive and negative whole numbers.
int i = 1;

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

Unsigned Integers

A

Positive whole numbers.

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

Floating Point Numbers

A

Real numbers.

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

Chars

A

Letters in English.

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

Constants

A

Fixed values.
const a = 1;

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