Вы находитесь на странице: 1из 2

Midterm Exam Review (Spring 2016)

PROG20799 Data Structures & Algorithm Development C


Duration: 1 hour 30 min
Midterm Content: It will cover all material for the following weeks
(check the content on SLATE):

Week 1 Intro to the course. Introduction to C


Week 2. Control statements. User functions. Recursive functions
Week 3_1. Arrays and Strings
Week 3_2. Creating User Libraries
Week 4_1. Userdefined types: structures
Week 4_2. Pointers
Week 5_1. Using Pointers. Dynamic Memory Allocation
Week 5_2. Into to Linked Lists
Week 6_1. Working with Linked Lists
Week 6_2. Doubly linked lists. Circular linked lists
Example of Exam:
IT has three parts MCS section, Short answer, Short Coding
questions. Please, check a sample below.

Part I. Multiple Choice Section.


Example. What is the most common value to return to the operating system
upon the successful completion of a C- program?
A. 1
B. 0
C. -1
D. NULL
E. exit (NULL);

Part II.

Short Answer Section

Example. Describe briefly what the following function is doing in general. You do not need to

comment every line! Suggest how to call this function in main(), and what will be expected
output?
Example:

Answer:

1 of 9

int max(int num1, int num2) {


int result;
if (num1 > num2)
result = num1;
else
result = num2;
return result;
}

Part III.

Short Coding Section

Example1. Write a C function to find out the factorial of a non-negative number entered

from the keyboard. You are not required to write a full program only the part to design an
algorithm.
Example2. Write a program fragment to insert a new node to the given linked list. You are

not required to write a full program only the part to implement an algorithm.

2 of 9

Вам также может понравиться