# PDF Archive

Easily share your PDF documents with your contacts, on the Web and Social Networks.

## SP13 Lab 6 Quizzes.pdf

Page 1 2 3 4 5 6

#### Text preview

Ain Shams University
Faculty of Computer &amp; Information Sciences
Structured Programming
Lab Exam
First year

Section 4

Write a program to fill in a 2-D dynamic array from the user and display it in a matrix form. Then the
program asks to reenter the values of a specific row or column (read them from the user) and then it
displays the modified matrix.
Ain Shams University
Faculty of Computer &amp; Information Sciences
Structured Programming
Lab Exam
First year

Section 5

Write a program that takes the size of two 2-D arrays , enter their elements, and returns 'true' if the
arrays are equal and 'false' otherwise. The two arrays are equal if all the corresponding elements in
each are equal.

Ain Shams University
Faculty of Computer &amp; Information Sciences
Structured Programming
Lab Exam
First year

Section 6

Write a program that reads the size of an array, its elements and then remove all duplicates from that
array, and displays the resulted array
Sample execution:
Enter the size of the array: 8
Enter the elements: 2,6,8,3,2,3,5,9
After removing duplicates: 6,8,5,9

Ain Shams University
Faculty of Computer &amp; Information Sciences
Structured Programming
Lab Exam
First year

Section 7

Write a program that displays the number of odd and even numbers of elements entered by the user in
a stored array. If the array had the following elements: 4, 2, 7, 10, 9, 7, 6, 10,
7, 9
Then display the array sorted in ascending order
Sample Execution
Even Numbers: 5
Odd Numbers: 5
Sorted array: 2,4,6,7,7,9,10,10