Sie sind auf Seite 1von 2

CS101 Spring 2019

Assignment 4
Registration #: Name: Due date: May 3, 2019

Provide brief and concise explanation in the technical nomenclature wherever


Q 1. Find logical and syntax errors in the following code segments.

Q 2. Write a function for computing the kinetic energy as follows:

Q 3. A function in a C++ program can only return one value. Explain briefly how this
problem can be avoided if arguments are passed to functions by reference.

Q 4. Explain the run-time aspects of passing arguments to functions by reference vs

passing arguments by value.

Q 5. Draw a diagram of CPU, RAM, I/O and system interconnections. In another

figure, zoom-in on the RAM and explain memory addressing, variable declaration,
and array variables declaration.

GIK Institute of Engineering and Technology