quiz8 - ===================== a) 1 b) 2 c) 3 d) 4 e) 5 f) 6...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 210: Computer Systems I: Machine Organization Spring 2009 - Section A0 Quiz #8 - 2009/05/04 Name: ______________________________ ================================================================================ 1: Circle which of the following (it could be any number of them) are instructions for the CS210-CPU (the simple CPU we have been discussing in class) which read values from one or more of the 4 main registers. a) NOP b) LOD c) STO d) ADD e) SUB f) MUL g) DIV h) SET i) JMP j) BEQ k) BNE l) BLT m) BNL n) IN o) OUT p) HLT ================================================================================ 2: Circle which one (1) of the following is the number of "char"s set asside to store the string "str" in the array defined below: ===================== char str[] = "What?";
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ===================== a) 1 b) 2 c) 3 d) 4 e) 5 f) 6 g) 7 h) 8 i) 9 j) 10 k) 11 l) 12 m) 13 n) 14 o) 15 p) 16 ================================================================================ 3: Circle which one (1) of the following is a C printf format code which will print an integer in hexadecimal, with a minimum of 4 digits: a) "%d" b) "%4d" c) "%.4d" d) "%44d" e) "%x" f) "%4x" g) "%.4x" h) "%44x" ================================================================================ 4: Circle which one (1) of the following would be the value of the integer variable "x" after the following code is run: ============== int x = 6; int *p = &x; *p -= 2; p -= 2; x += 1; ============== a) 1 b) 2 c) 3 d) 4 e) 5 f) 6 g) 7 h) 8...
View Full Document

This document was uploaded on 04/20/2010.

Ask a homework question - tutors are online