Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
0 of .
Results for:
P. 1
ECE 1113, final exam sem 1 05/06

# ECE 1113, final exam sem 1 05/06

Ratings:

4.5

(2)
|Views: 457|Likes:
final exam paper "computing systems and programming" ECE 1113 Kulliyah of Engineering.. semester I, 2005/06, IIUM... good luck
final exam paper "computing systems and programming" ECE 1113 Kulliyah of Engineering.. semester I, 2005/06, IIUM... good luck

### Availability:

See more
See less

05/09/2014

pdf

text

original

INTERNATIONAL ISLAMIC UNIVERSITY MALAYSIA

FINAL SEMESTER EXAMINATIONSEMESTER I, 2005/2006 SESSION

KULLIYYAH OF ENGINEERING
Programme : ENGINEERING Level of Study : UG 1Time : 10.00 am 11.30 am Date : 09/10/2005Duration : 1 ½ HrCourse Code : ECE 1113 Section(s) : Five (5)Course Title :
Computing Systems and Programming
This Question Paper Consists of
Eight

(8)
Printed Pages (Including Cover Page) With
Six (6)
Questions.
INSTRUCTION(S) TO CANDIDATES

DO NOT OPEN UNTIL YOU ARE ASKED TO DO SO
The total mark of this examination is
50
.
This examination is worth
20%
of the total assessment.
There are
Six (6)
ALL
questions.

ALL

Answers should be clear and intelligible.

Any form of cheating or attempt to cheat is a seriousoffence which may lead to dismissal.

Computing Systems and Programming FINAL ECE 11132
Section A [15 marks]
]
Q.1) [15 marks] Objectives
Select the best answer for the following questions.1. In C, the following equation is best representing by which statement?
(1 mark)
Equation:
distance =

200
21
at v x
++

a)
distance =

0
x
+
0
v
* t +
21
* a * pow( 2 , t );b)
distance =
(
0
x
+
0
v
) * ( t +
21
) * a * pow( 2 , t );c)
distance =

0
x
+ (
0
v
* t )+ (
21
* a * pow( t , 2 ));d)
distance =
(
0
x
+
0
v
* t) + (
21
* a * pow( t , 2 ));
2. The difference between the source program and the object program isa) the source program can be executed, and the object program cannot be executed.b) the source program is the original code and the object program is a modifiedcode.c) the object program is also a source program.d) the source program is specified in a high- level language, and the object programis specified in machine language.
(1 mark)

3. Find the answer for the following statement.
(1 mark)

int x = 5, y = 5, z, sum;z = x++ * y%3;sum = z + x + --y ;
a) 16b) 20c) 21d) 224. Which of these is true if
x
is 10?
(1 mark)
a) (x>=0) && (x<10)b) (!(x>10)) || (x<=100)c) !(x>=0) && (x<10)d) !(x= =10) || (x!=10)5. A program is written with programmer define function that take double data type
x
and int
n
to control the
for
loop.
x
and
n
is in the actual parameter and
y
and
m
is in the formalparameter. The function is referred by call_by_value. Which C statement is best describethe above statements?
(1 mark)

Computing Systems and Programming FINAL ECE 11133

function call function definition
a) prog(x , n) double prog(double y, int m)b) prog(y , m) double prog(double x, int n)c) prog(y , m) double prog(int x, double n)d) prog(x , n) double prog(double y, double m)6. What will be printed when the following code is executed?
(1 mark)

#include<stdio.h>int main(){ int sum=0;for(int i=0;i<5;i++);sum+=i;printf("Sum=%d\n",sum);return 0;}
a) Sum=0b) Sum=4c) Sum=5d) Sum=107. What is the new value of
count
after the following statements is executed.
(1 mark)

int count = 750;……if (count>0)if (count>=1000)count=0;elseif (count <500)count*=2;elsecount*=10;elsecount+ =3;
a) 0b) 1500c) 7500d) 7538. Which of the following will generate a floating random number between -5.5 and 5.5a) ((double)rand()/RAND_MAX)*(11)-5.5b) ((double)rand()/RAND_MAX)*(-11)-5.5c) ((double)rand()/RAND_MAX)*(12)-5.5d) ((double)rand()/RAND_MAX)*(12)+5.5
(1 mark)
9. An individual element in the array is addressed by specifying
(1 mark)
a) the name of the arrayb) the number of the element within the array followed by the name of the arrayc) the number of the element in the arrayd) the name of the array and the number of the element