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

A. Say True or False [5 points 1. int main O is a complete and correct C program

ID: 3726276 • Letter: A

Question

A. Say True or False [5 points 1. int main O is a complete and correct C program 2. printf and main are C tokens 3· The format specification for an int type data should not contain a decimal point and precision, %8.2d is illegal. 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? a. dogs2 b. cat number c, pears3 d, area% - 2. Which of the following are incorrect C assignment statements? 3· The unary operator ~ does which of the following functions? 4. The condition (!valid) means 5. The assignment statement a = b += c + d simplifies to c.year = days-365; d.while-32; year= 1967; b. day-24 hours; 2s complement b. 1s complement c.negative of a number d. modulo two if(valid 1-o) b. if (!valid0) c. if (valid0) d. if(!valid != 0) a=b+(e+d); b, a = b + (b + c + d); c, a = (b = b + (c + d)); d' a = b = (b = c + d) a. a. a.

Explanation / Answer

Part A.

1. True

2. True

3. False

4. False. it will print 123

5. False, it is integer part only

B

1. d

2. b

3. b

4. c

5. b