Shared Flashcard Set

Details

Advanced Data Types and Flow Control
data types, macros, and flow control for the C programming language
19
Computer Science
Undergraduate 1
06/25/2015

Additional Computer Science Flashcards

 


 

Cards

Term
int
Definition
Stores a regular integer, defaulting to 32-bits
Term
double
Definition
Holds a large floating point number
Term
Float
Definition
Holds a smaller floating point number
Term
char
Definition
Holds a single 1 byte character
Term
void
Definition
Indicates "no type" and used to say a function returns nothing, or a pointer has no type as in void *thing
Term
enum
Definition
Enumerated types, work as integers, convert to integers, but give you symbolic names for sets. Some compilers will warn you when you don't cover all elements of an enum in switch-statements
Term
unsigned
Definition
Changes the type so that it does not have negative numbers, giving you a larger upper bound but nothing lower that 0
Term
signed
Definition
Gives you negative and positive numbers, but halves your upper bound in exchange for the same lower bound negative
Term
long
Definition
Uses a larger storage for the type so that it can hold bigger numbers, usually doubling the current size
Term
short
Definition
Uses smaller storage for the type so it sores less, but takes half the space
Term
const
Definition
Indicates the variable won't change after being initialized
Term
volatile
Definition
Indicates that all bets are off, and the compiler should leave this alone and try not to do any fnacy optimizations to it. You usually only nees this if you're doing really weird stuff to your variables
Term
register
Definition
Forces the compiler to keep this variable in a register, and the compiler can just ignore you. These days compilers are better at figuring out where to put variables, so only use this if you actually can measure it improving the speed
Term
TYPE CONVERSION: LIST THE ORDER
Definition
  • long double
  • double
  • float
  • int (but only by char and short int)
  • long
Term
  1. int8_t
  2. uint8_t
  3. int16_t
  4. uint16_t
  5. int32_t
  6. uint32_t
  7. int64_t
  8. uint64_t
Definition
  1. 8 bit signed integer
  2. 8 bit unsigned integer
  3. 16 bit signed integer
  4. 16 bit unsigned integer
  5. 32 bit signed integer
  6. 32 bit unsigned integer
  7. 64 bit signed integer
  8. 64 bit unsigned integer
Term
INT(N)_MAX
Definition
Maximum positive number of the signed integer of bits (N), such as INT16_MAX
Term
INT(N)_MIN
Definition
Minimum negative number of signed integer of bits (N)
Term
UINT(N)_MAX
Definition
Maximum positive number of unsigned integer of bits (N). Since it's unsigned the minimum is 0 and can't have a negative value.
Supporting users have an ad free experience!