Quiz 10
Quiz 10
REGION X
DIVISION OF CAGAYAN DE ORO CITY
CAGAYAN DE ORO NATIONAL HIGH SCHOOL
PART I
Direction: Solve the following problems. In One whole sheet of paper. Copy and answer, Show your solution.
1. int a = 151, b = 15, c = 51, result; 1. << (left shift) Use 8 bits
printf("(a < c) && (c > b)&&(a!=b) &&(a==b)is %d \n", result); int a = 20;
Output:_______ printf("b<<3 = %d\n", b << 3);
2. int a = 18, b = 800, c = 100, result; a= 10=
printf("(a < c) || (c <b)||(a==b) ||(a<b)is %d \n", result); =
Output:_______ Result:
3.int a = 100, b = 10, c = 1, result; 2. >> (right shift) Use 8 bits
printf("!(a < c) is %d \n", result); result=
Output:_______ int a = 20;
4. int a = 11, b = 11, c = 111, result; printf("b >>2 = %d\n", b >> 2);
printf("!(a ==b) is %d \n", result); a= 10=
Output:_______ =
5. int a = 20, b = 50, c = 30, result; result=
printf("!(a > c) is %d \n", result); 3. (AND/&)
Output:_______ int a = 8, b = 4;
6. int a = 5, b = 10, result; a= 8 =
printf("(a%b) && (a > b)&&(a<b) &&(a!=b)is %d \n", result); b= 4 =
Output:_______ result=
4. (OR/|)
Assignment int a = 5, b = 3;
7. let a = 10; a= 5 =
a += 100 b= 3 =
solution: result=
5. (XOR/^)
8. Let a= 80 int a = 9, b = 5;
a-=30 a= 9 =
solution: b= 5 =
9. ans= b+e/b+d-b*d
1
Part II.
REFLECTION ACTIVITY
Direction: Answer the following reflection for the Operators Lesson: Use 1 or 2 whole sheets of paper.
1. What have you learned in our discussions about operators? You may summarize it to explain your
answer. (minimum of 5 sentences)
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
2. What Operators you feel very easy to solve? Why? (minimum of 5 sentences)
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
3. What operators you feel very difficult to solve? Why? (minimum of 5 sentences)
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
4. Where you able to cope with the difficult lessons (yes or no)? How? (minimum of 5 sentences)
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
5. Do you think that all operators are very important in programming? Why? (minimum of 5 sentences)
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________