Unit 3 C Programming Flashcards

1
Q

What are the rules to create a valid C variable

A
  • Must begin with a letter, $, _
  • Cannot begin with a number or symbol
  • Cannot contain a space of symbol
  • Cannot be a C keyword
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What naming convention do we use for variables

A

use camelBack or saddleback notation

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

How do you declare a C constant at runtime and compile time/. What are the differences between both?

A

define SIZE 1000u // This will be in a global scope. It is set at compile time

const unsigne SIZE 1000; // This will be in a local scope. It will be set in runtime

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