ES3 Final Exam
ES3 Final Exam
6 ______1. C was originally developed in the 1970s, by Dennis Ritchie at Dell Telephone Laboratories, Inc.
7 ______2. Information system is a set of activities used to build an information system.
8 ______3. Design is one of the phases of System Design Life Cycle.
9 ______4. System development should involve representatives from each department in which the proposed system will be
10 used.
11 ______5. A Structural diagram is a tool that graphically shows the connections among entities in a system.
12 ______6. Web developers can create their on web applications.
13 ______7. Rectangles denotes attributes in a flowchart.
14 ______8. Attributes are nothing but an association among two or more entities.
15 ______9. DHTML is an example of a scripting language.
16 ______10. Process modeling is sometimes called structural analysis.
17 ______11. C language consists of some characters set, numbers and some special symbols.
18 ______12. The words formed from the character set are building blocks of C and are sometimes known as tokens.
19 ______ 13. An identifier is a word used by a programmer to name a variable, function, or label.
20 ______14. A variable is nothing but a name given to a storage area that our programs can manipulate.
21 ______15. “Breaks” is a keyword in the C language.
22
23 Part 2 Identification. Identify which phase of the System Development Life Cycle the following activities belong to.
34
35 Part 3 Coding (15 points)
36 Write a code that can remove the duplicate entrees in an integer array with 10 element. The output should be displayed
37 without redundant info.
38 For example:
39 input: 1, 1, 1, 2, 3, 4, 4, 4, 5 and 2
40 Output: 1, 2, 3, 4, 5
41 Criteria:
42 Accuracy: 5 points
43 Efficiency: 5 points
44 Readability: 5 points
45
46
College of Engineering and Architecture
Final Exam
47 Part 4 Error identification: Give the line number where there is an error in the code
48 Problem number 1.
50 #include <stdio>
51 int main() {
52 int pas, x=10;
53
54 while (x!=0)
55 {
56 printf("\nInput the password: ");
57 scanf("%d",&pass);
58
59 if (pass==1234)
60 {
61 printf("Correct password %d");
62 x=0;
63 }
64 else
65 {
66 printf("Wrong password, try another"):
67 }
68 printf("\n");
69 }
70 return 0;
71 }
College of Engineering and Architecture
Final Exam
72 Problem number 2.
73
74 Ans: _____ ____________________
75
76 #include <stdio.h>
77 int main(void) {
78 int j, numbers[5],total=0;
79 printf("\nInput the first number: ");
80 scanf("%d", &numbers[0]);
81 printf("\nInput the second number: ");
82 scanf("%d", &numbers[1]);
83 printf("\nInput the third number: ");
84 scanf("%f", &numbers[2]);
85 printf("\nInput the fourth number: ");
86 scanf("%f", &numbers[3]);
87 printf("\nInput the fifth number: ");
88 scanf("%f", &numbers[4]);
89 for(j = 0: j < 5: j++) {
90 if((numbers[j]%2) != 0)
91 {
92 total += numbers[j];
93 }
94 }
95 printf("\nSum of all odd values: %d", &total);
96 printf("\n");
97 return 0;
98 }
99
100
101 Prepared by:
102
103 ENGR. MARK NICHOL C. SAN JUAN
104 Instructor I
105 Date:______________
106
107 Checked by:
108
109 ENGR. RICHMONILYN A. SALVADOR
110 Dept. Chair
111 Date: __________________
112