{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# PFC-quiz9 - thi trc nghim PFC Quiz9 slot 35(10 Ghi ch Nhng...

This preview shows pages 1–3. Sign up to view the full content.

Đ thi tr c nghi m PFC- Quiz9 - slot 35 (10') Ghi chú: Nh ng câu không ghi đi m đ c hi u là 1 đi m. ượ 9.01. (0.5 đi m) What is the header file containing getch() function? conio đúng stdlib stdio.h all of the above 9 .02. (0.5 đi m) Which loop that counts from 0 to 5 for (c = 0; c <= 5; c++) đúng for (int c = 0; c <= 6; c++) for (c = 0; c < 5; c++) for (c = 0; c <= 4; c++) 9.03. (0.5 đi m) For which value(s) of the integer x will the following code become an infinite loop? int number=1; while(1) { printf("%d ",number); if (number == 3) break; number += x; } only 0 đúng only 1 only 2 only 1 or 2 9.04 (0.5 đi m) After the sample code below has been executed, what value will the variable x contain? int x = 5; int y = 2; char op = '*'; switch (op) { default : x += 1; case '+' : x += y; case '-' : x -= y;

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
} 4 5 6 đúng 7 8 9.05 (0.5 đi m) With what do you replace the ???? to make the function shown below return the correct answer? long factorial (long x) {???? return(x * factorial(x - 1)); } if (x == 0) return 0; return 1; if (x >= 2) return 2; if (x == 0) return 1; if (x <= 1) return 1; đúng 9.06. What will the code below print when it is executed?
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern