click below
click below
Normal Size Small Size show me how
INFO-1279 Test 1
C Programming
Question | Answer |
---|---|
What are Binary Numbers? | A number system that uses only the digits 0 and 1 |
What are Decimal Numbers? | Humans usually work with decimal numbers using the 10 digits (0,1,2,3,4,5,6,7,8,9) |
What are Hexadecimal Numbers? | Are also used as a shorthand for binary numbers and uses the 16 digits (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F) |
What is a Bit? | Acronym for binary digit. Stores one bit (0 or 1) |
What is a Byte? | Memory cells grouped up into units of 8 bits. Provides all symbols to be used. Larger values can be handled by grouping more bytes together as needed. |
What is the ASCII Table? | Meant to standardize data exchange between computers. Based on an 8bit(one byte) coding scheme. Possible 2^8 or 256 values. Letters, uppercase/lowercase gets their own code number |
What is Unicode? | ASCII on steroids. Set of instructions telling the machine what to do. Switches were originally set manually on a plugboard. 65, 546 or 2^16 possible values. |
What is Machine Code? | Assembler is one kind of source code. The code that I write is also referred to as source code. After translation, we get object code or binary machine code. |
What does an Interpreter do? | reads source code line by line, translates a line, executes line on the CPU |
What does a Compiler do? | Reads entire source program, translates all to a binary machine code file. |
What is a Datatype? | Its how a computer language represents various types of numbers and text characters we use in our physical world. |
What is a Char? | A datatype for single characters “a”, “-”, “G” char, unsigned char |
What is an Int? | A datatype for whole numbers (1,2,3) 8 integer types, smallest to largest Short int, unsigned short int, int, unsigned int, long int, unsigned long int, long long int, unsigned long long int |
What is a Double? | A datatype for real or floating-point numbers (25.24) float, double, long double |
What is a Bool (Boolean)? | A datatype for true or false |
What is a Void? | Most powerful data type, means empty data type |
What is a C String? | An array of characters, a literal is a c string and is represented as H E L L O or initialized as char s[12] = “hi there” h i t h e r e Each c string array contains the null character A c string has a fixed capacity |
What does this operator do? (==) | Used to see if two values are the same |
What does this operator do? (!=) | Used to check to see if two values are not equal |
What does this operator do? (<) | Less than, the number on the left is less than the number on the right |
What does this operator do? (>) | Greater than, the number of the left is greater than the number on the right |
What does this operator do? (||) | Or statement, if one number doesn’t equal a set value then check the other Condition |
What does this operator do? (<=) | Less than or equal to |
What does this operator do? (>=) | Greater than or equal to |
What does this operator do? (+) | Used to indicate a positive change. Unary operator (addition indicator as well) |
What does this operator do? (-) | Used to indicate a negative change. Unary operator (subtraction indicator as well) |
What does this operator do? (*) | Multiplication indicator |
What does this operator do? (/) | Division indicator |
What does this operator do? (%) | Modulus division indicator (gets the remainder ex. 7/3 = 1 as the remainder) |
What is BEDMAS? | (Brackets, Exponents, Division, Multiplication, Addition and Subtraction) as occurs from left to right. |
What are these operators called? (+) (-) | urinary operators because they take only one operand, by default numeric values are assumed to be positive. To be negative, must assign a negative value to a literal count (ex. count = -15) |
What are these operators called? (++) (--) | increment and decrement operators, add one and subtract one from a variable. Commonly used to control loop counter variables. ++ increments the variable count by 1 after each iteration. |
What is a Pre-Increment? | increment operation is done before the assignment operation is carried out |
What is a Post-Increment? | Most common, involves placing operator after the variable. Variable not incremented until after it has been used in the statement |
What are Shortcut Operators? | (+= , -= , *=, /=, %=) Shorter way of coding “add this value to this variable” |