0% found this document useful (0 votes)
10 views

Lab Sheet 06 - Arrays

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Lab Sheet 06 - Arrays

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Saegis Campus

Faculty of Computing and Technology

Department of Computing

BSc (Hons) in Computer Science/ Software Engineering/


Information Technology

Batch 02

Lab sheet 06 – Arrays


1. Get the output of the following program.

2. We can modify the program to print the values using a loop as follows.

3. Declare an array of type integer and size 5 named dates. Then assign the
given values and print the Array.

25 30 46 12 58

4. Declare an Array named Marks of the size 6 and assign the given values.
Then print the Summation and the Average of those marks.

Marks: 88, 99, 73, 67, 89, 57


5. Modify above program (question no: 04) to facilitate the user to enter the
marks.

6. Write C programs for the following questions by using the numbers given
below.

3 2 4 5 649781

a. Find the minimum.

b. Find the maximum.

c. Print the numbers in reverse order.

d. Allow user to search a number and display the location within the
array, if the number is found. If not display “Value not found”.

7. Write a C program to multiply the content of array A and B and store it in a


new array called C.

int A[5] = { 10, 20, 30, 40, 50};

int B[5] = { 34, 67, 12, 89, 12};

8. Write a program to enter and print your name by using an array.

You might also like