0% found this document useful (0 votes)
33 views

Diagnostic Test For C Q1 1

This document contains a 40-item diagnostic test on computer programming concepts in C++ for 10th grade students. The test covers topics like variable declaration, data types, operators, control flow statements like for loops, if/else statements, switch statements, and jump statements. It consists of multiple choice questions to assess students' understanding of basic C++ syntax, logic, and programming concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Diagnostic Test For C Q1 1

This document contains a 40-item diagnostic test on computer programming concepts in C++ for 10th grade students. The test covers topics like variable declaration, data types, operators, control flow statements like for loops, if/else statements, switch statements, and jump statements. It consists of multiple choice questions to assess students' understanding of basic C++ syntax, logic, and programming concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Diagnostic Test on Computer Programming C++ (STE Grade 10)

Quarter 1
Name: _____________________________________________________ Score:_____________
Year & Section: ______________________________________________ Date: _____________

Part I.
Directions: Read each item carefully and choose the best letter of your answer.
1. How do you declare the variable BODY TEMPERATURE in C++ programming language?
a. declare as int c. declare as double
b. declare as char d. declare as string

2. How do you declare the variable AGE in C++ programming language?


a. declare as int c. declare as double
b. declare as char d. declare as string

3. How do you declare the variable ADDRESS in C++ programming language?


a. declare as int c. declare as double
b. declare as char d. declare as string

4. How do you declare the variable VACCINE in C++ programming language?


a. declare as int c. declare as double
b. declare as char d. declare as string

5. How do you declare the variable SYMPTOMS in C++ programming language?


a. declare as int c. declare as double
b. declare as char d. declare as string

6. I would like to insert comments in the source code. How can I apply comments?
a. use // c. use “ ”
b. use { } d. use ;

7. I would like to display some characters on the computer screen. How can I display characters?
a. use // c. use “”
b. use { } d. use ;

8. Syntax error report shows missing end of the statement. How can I fix this problem?
a. use // c. use “ ”
b. use { } d. use ;

9. How can I determine that this line of code starts and ends the function?
a. use // c. use “ ”
b. use { } d. use ;

10. I would like to ask the age of the user, how can I read the characters typed by the user from the
keyboard?
a. use // c. use cout
b. use “ ” d. use cin

11. How do you get or solve for the product of variables A and B?
c. use operator + c. use operator *
d. use operator - d. use operator /

12. How do you get or solve for the ratio of variables A and B?
a. use operator + c. use operator *
b. use operator - d. use operator /

13. How do you get or solve for the difference of variables A and B?
a. use operator + c. use operator *
b. use operator - d. use operator /
14. How do you get or solve for the sum of variables A and B?
a. use operator + c. use operator *
b. use operator - d. use operator /

15. How do you get or solve for the sum of variables A and B?
a. use operator + c. use operator *
b. use operator - d. use operator /

16. Determine the value of the expression (5 == 5)?


a. true c. cannot determine the value
b. false

17. Determine the value of the expression !(5 == 5)?


a. true c. cannot determine the value
b. false

18. Determine the value of the expression (5==5) && (3 > 6)?
a. true c. cannot determine the value
b. false

19. Determine the value of the expression (5==5) || (3 > 6)?


a. true c. cannot determine the value
b. false

20. Determine the value of the expression !(5==5) || (3 > 6)?


a. true c. cannot determine the value
b. false

21. What is the value of the expression x = 7 + 7 - 3?


a. 0 c. 11
b. 10 d. 28

22. What is the value of the expression x = 3 + 7 * 3 + 7 - 3?


a. 0 c. 11
b. 10 d. 28

23. What is the value 30 / 3?


a. 0 c. 11
b. 10 d. 28

24. What is the value 30 % 3?


a. 0 c. 11
b. 10 d. 28

25. What is the value 30 % 4?


a. 0 c. 7
b. 2 d. 10

26. In this line of code: for (int n=10; n>0; n--), which one is for initialization?
a. int n=10 c. n--
b. n>0

27. In this line of code: for (int n=10; n>0; n--), which one is for condition?
a. int n=10 c. n--
b. n>0

28. In this line of code: for (int n=10; n>0; n--), which one is for increase/decrease?
a. int n=10 c. n--
b. n>0
29. In this line of code: for ( n=0, i=50 ; n!=i ; n++, i-- ), what will be the final value of n?
a. 0 c. 50
b. 25

30. In this line of code: for ( n=0, i=50 ; n!=i ; n++, i-- ), what will be the final value of i?
a. 0 c. 50
b. 25

31. Which jump statement will you use if you want to end the loop?
a. break b. continue c. goto

32. Which jump statement will you use if you want to skip the rest of the loop in the current iteration and
jump to the start of the following iteration?
a. break b. continue c. goto

33. Label is the destination point of what jump statement?


a. break b. continue c. goto

34. Which of the following is initialization in the statement (int n=0; n<10; n++)?
a. int n = 0 b. n < 10 c. n++

35. Which of the following is condition in the statement (int n=0; n<10; n++)?
a. int n = 0 b. n < 10 c. n++

36. Which expressions does switch statement like?


a. break b. case c. if-else statement

37. How to end a case in a switch statement?


a. break b. case c. if-else statement

38. Which of the following is correct?


a. switch (n) b. switch (1) c. switch (1…3)

39. Which of the following is correct?


a. case n: b. case 1: c. case (1…3)
40. The program will execute the statements included after what label, if the value of expression did not
match any of the previously specified constants?
a. case 1: b: case 2: c. default:

Prepared by:

ROMEO P. OPENA JR
TLE-ICT Teacher

Checked by:

SALVACION D. ENSO
Head Teacher IV - TLE

You might also like