Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Lab: Introduction to Computers Code: ENGR 103 Quiz [30 points]: Answer ALL Quest

ID: 3726280 • Letter: L

Question

Lab: Introduction to Computers Code: ENGR 103 Quiz [30 points]: Answer ALL Questions Instructor. Dr. Vidhyacharan Bhaskar Date: March 08, 2018 Time duration: 1 hour 30 min A. Say True or False [5 points] 1. int main 0 () is a complete and correct C program 2. printfand main are C tokens 3· The format specification for an int type data should not contain a decimal point and precision, %82d isillegal. 4. The statement printf("%-3d", 123); displays-123 5· The result of an integer division is a rounded result. B. Choose the best answers (more than one may be correct for some cases) : [5 points] 1. Which of the following are illegal identifiers? 2. Which of the following are incorrect C assignment statements? 3. The unary operator - does which of the following functions? 4. The condition if (valid) means 5· The assignment statement a-b +-c + d simplifies to C, pears3 d, area% a. dogs2 b. cat number a. ycar- 1967; b, day -24 hours; c.year days 365; a. 2s complement b. 1s complement c.negative of a number d. modulo two a if(valid !-0) b. if (!valid-0) c. if(valid0) d if(!valid !-) a a-b+(c+d), b.a-b+(b+c+d); c. a-(b-b+(c+d) d.a-b-(b-d) - d. while 32: C. Match the following Escape characters with their corresponding ASCII values given in hexadecimal notation: [5 points a. VTAB b. BELL c. BACKSLASH d. GARRIAGE RETURN e. FORMFEED f. BACKSPACE & HTAE h. SINGLE QUOTES i. DOUBLE QUOTES j. QUESTION MARK 2. "x22 10. "x8 D. Find the syntax errors in the following piece of code fragments: [5 points] char msg = "warning: "; for (m = 0; m b) ? a; b; d. while (c getchar0!-n); e. do{i=i*2; i++;) while (i100) E. Find the output of the following piece of codes: [6 points #include . for (-1:ics,i)cx-2y-4 a.

Explanation / Answer

Hi, I have answered first 3 Parts.

Please repost others in separate post.

Part A.

1. True

2. True

3. False

4. False. it will print 123

5. False, it is integer part only

Part B

1. d, % is not alloweed

2. b, space is not alloweed

3. b

4. c

5. b