Vous êtes sur la page 1sur 9
CONFIDENTIAL = CSIDEC 2015/¢SC425 SS UNIVERSITI TEKNOLOGI MARA FINAL EXAMINATION COURSE : INTRODUCTION TO COMPUTER PROGRAMMING COURSE CODE 2 CSC425 EXAMINATION : DECEMBER 2015 TIME : 3 HOURS INSTRUCTIONS TO CANDIDATES 1 This question paper consists of three (3) parts: PART A (10 Questions) PART B (5 Questions) PART C (1 Question) 2 ‘Answer ALL questions from ail three (3) parts in the Answer Booklet. Start each answer on a new page. 3 Do not bring any material into the examination room unless permission is given by the invigilator, 4 Please check to make sure that this examination pack consists of i) the Question Paper ji) an Answer Booklet ~ provided by the Faculty 5 ‘Answer ALL questions in English. DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO This examination paper consists of 9 printed pages ‘© Hak Cipta Universiti Teknologi MARA ‘CONFIDENTIAL CONFIDENTIAL 2 CSIDEC 2018/¢8C425 PART A (20 MARKS) 1. Name the programming language that does not require a translator. ‘A. Machine language B. Assembly language C. High level programming language D. Natural language 2. Identify the stage after creating source code. A. Flowchart B. Key in Program Cc. Compile D. Testing 3. __ Name the type of error that cannot be traced by the compiler, A. runtime error B. logic error C. syntax error D. compile error 4. State the output of the following program segment. bool t = true, £ = false; cout << ((!t G& £) I] (t I] t & £)); A no Byes co D. 1 5. Select statement that can be used in selection structure. do. .while statement for statement switch statement while statement pomp> (© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL, CONFIDENTIAL 3 CSIDEC 2015/68C425 6. Give the output for the following code: if (6 > 2*5) cout<<"Hello\n”; cout<<”\n There”; Hello There There Hello There Hello 9 9p> There 7. Identify the suitable terminology for a. void Jumlah(int,int); > a int main( ) { Jumlah (x,y) Function call Function definition Function prototype Parameter passing pom> 8. State the type of condition used in the following whi le loop. int Limit; int counter = 0; cin >> limit; while (counter < limit) { cout << counter; counter++; Flag-controlled Counter-controlled EOF-controlled Sentinel-controlled pom> (© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL,

Vous aimerez peut-être aussi