OCS 752 Assignment II
OCS 752 Assignment II
Assignment Questions II
Part A
1. What are header files? Why they are important?
2. Why do we include <stdio.h> in our programs?
3. What are arrays and why are they needed?
4. How is an array represented in the memory?
5. Write an example code to declare a two dimensional array.
6. What is the use of multi-dimensional arrays?
7. Given an array int marks[] = {99,67,78,56,88,90,34,85}, calculate the address of
marks[4] if the base address = 1000.
8. Differentiate linear search and binary search methods that are used with arrays.
9. Write a C program to exchange two elements of an array.
10. What are the various sorting concepts used in arrays?
Part B