top of page

CS116 quiz 1

1. Write a program in C to merge one sorted array into another sorted array using function called sort(), the size for each array is 5.
Hint: you need a third array of size 10 to merge the arrays
Expected Output :
The first given Array is : 10 12 14 16 18
The second given Array is : 11 13 15 17 19
After merged the new Array is :
10 11 12 13 14 15 16 17 18 19

2. transpose an array that is a 2d array with 3 rows and 4 columns using function called transpose( )
Hint: you need athird array to add your transpored array
example:
array:  1 2 3 4      transposed array:    1 5 9 4
           5 6 7 8                                      2 6 1 5
           9 1 2 3                                      3 7 2 6
           4 5 6 7                                      4 8 3 7

© 2020 by GJU IT CLUB

bottom of page