EE171 exam 2012 2013a

August 22, 2017 | Autor: Shafi Abdul | Categoria: Computer Science, Software Engineering
Share Embed


Descrição do Produto

UNIVERSITY OF DAR ES SALAAM College of Engineering and Technology Department of Electrical Engineering EE 171: Introduction to Computers & Programming for Engineers University Examination, First Semester, 2012/2013.

Date: January 24, 2013

Internal Examiner: Prof. B. M. M. Mwinyiwiwa

Instructions to Candidates: 1. Time allowed: 2 HOURS. 2. This is a closed Book Examination. 3. Attempt question one (Q1) from section A and any three (3) questions from section B. 4. This paper consists of a total of TWO (2) printed pages only. 5. Use of Mobile Phones is strictly prohibited in the Examination Room. Section A: Computer Fundamentals

Q1. (a) Briefly explain the function of application software. (4 marks) (b) Give two examples of Optical Storage Media. (2 marks) (c) Give two examples of Magnetic Storage Media. (2 marks) (d) Briefly explain the importance of system software in a computer system (5 marks) (e) Give four types of registers which are commonly used in a Computer System. (4 marks) (f) Give four examples of Computer Peripheral Devices which are only input. (4 marks) (g) Briefly explain the merit(s) of serial data transmission as compared to parallel data transmission. (4 marks)

Section B: Introduction to C Programming

Q2. (a) Briefly explain why C language can run on many different computers, but IBM assembler runs only on IBM or IBM-compatible computers? (5 marks) (b) Briefly explain the advantage of modularity as applied to C programming language (5 marks) (c) Briefly explain the difference between a pointer variable and a pointer constant. (5 marks) (d) What will be the output of the following programme? (10 marks) #include #define PRINT(x) printf(“x = %d\n”, x) #define SIZE 5 int a[ ] = {4, 3, 2, 1, 0}; int *iptr[ ] = {a, a+1, a+2, a+3, a+4}; int **iiptr = iptr; Main() { int i, n, *ptr, **pptr, i = 50; ptr = &i; pptr = &ptr; PRINT(i); PRINT(*ptr); PRINT(**pptr); PRINT(a[3]); PRINT(**(iiptr + 3)); for(n = 0; n < SIZE; n++) PRINT(*iptr[n]; }

1

Q3. (a) Briefly explain the three conditions that an identifier must satisfy in C programming. (7 marks) (b) Using simple examples, explain the difference between simple statement and compound statement using if keyword. (8 marks) (c) Briefly explain what are keywords as referred to C Programming? (5 marks) (d) Give the meanings of the following operations. (5 marks) (i) X && Y (ii) X || Y (iii) X == Y (iv) X != Y (v) X
Lihat lebih banyak...

Comentários

Copyright © 2017 DADOSPDF Inc.