Exam prep Flashcards
What happens if a signed and unsigned value are used in an expression?
The signed value is converted to an unsigned value
What happens first when changing size and sign?
Size changes first
How many times the bits do you need for multiplication?
2 times
How many bits are required for two’s complement multiplication?
2W bits
What are system directories surrounded by?
<>
What are user directories surrounded by?
“ “
Does a=b=c=4 set all values to 4?
Yes
Can global variables be assigned other variables?
No
If a type is not specified, what is it assumed to be?
Int
What are syntactic errors?
When the input code is not legal and is caught by the compiler
What are semantic errors?
When the code is legal but not what the programmer intended and is not caught by the compiler
What are algorithmic errors?
Problems with the logic of the program—does what the programmer intended but doesn’t solve the right problem.