Arellano University Plaridel Campus: Senior High School Department

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

ARELLANO UNIVERSITY

PLARIDEL CAMPUS
General Kalentong Street Mandaluyong City
SENIOR HIGH SCHOOL DEPARTMENT

QUARTERLY EXAMINATION
COMPUTER PROGRAMMING 1

Name: Gr.&Sec.: Date:


Score:

#include <stdio.h> Use this space for computation

int main()
{
int a, b, c;

printf("Enter Number: ");


scanf("%d",&a);

for(b=1;b<=a;b++)
{
c=b%2;

if(c==0)
{
printf("%d, ",b);
}

return 0;
}

DIRECTION: Analyze each question and encircle the correct answer. (2pts each)

1. If A=10, what will be the output of the program illustrated above?


A. 12345678910
B. 246810
C. 012345678910
D. 1246810

2. If A=15, what will be the output of the program illustrated above?


A. 2468101214
B. 123456789101112131415
C. 246810111315
D. 0123456789101112131415

3. If A=10 and B=2, what will be the output of the program illustrated above?
A. 12345678910
B. 246810
C. 012345678910
D. 1246810
4. If A=10 and C=B%5, what will be the output of the program illustrated above?
A. 12345
B. 510
C. 012345
D. Error/No Answer

5. If A=10 and C=B%3, what will be the output of the program illustrated above?
A. 0123
B. 0369
C. 369
D. Error/No Answer

6. If C=B%3, what will be the output of the program illustrated above?


A. 0123
B. 0369
C. 369
D. Error/No Answer

7. If A=20 and B=5, what will be the output of the program illustrated above?
A. 2468101214161820
B. 68101214161820
C. 6810121416171820
D. 24681214161820

8. If A=40 and C=3, what will be the output of the program illustrated above?
A. 36912151821242730333639
B. 036912151821242730333639
C. 3691215182124273033363940
D. Error/No Answer

9. If A=40 and B=3, what will be the output of the program illustrated above?
A. 36912151821242730333639
B. 036912151821242730333639
C. 3691215182124273033363940
D. Error/No Answer

10. If A=40 and B=3, what will be the output of the program illustrated above?
A. 36912151721242730333639
B. 036912151821242730333639
C. 3691215182124273033363940
D. Error/No Answer

END OF EXAMINATION
Prepared by: Mr. Ace Bhyron Cancino
ICT Teacher

Checked by: Mr. Ace Bhyron Cancino


ICT Coordinator

Noted by: Mr. Janno H. Vizco


Academic Coordinator

Mrs. Junna C. Bulay


Assistant Principal

Approved by: Mrs. Vilma S. Dominguez


Principal

You might also like