Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

NAME : Soham kadam

CLASS : FY BSc. Data Science

SUBJECT : Introduction to C programming

SUBJECT CODE : DS102

PRN No. : 2001202002

DATE : 27 May 2021

SKILL EXERCISE: 05

Title: Pointers

1. What is the purpose of this activity?

The purpose of this activity is to learn about the use of pointers in C


programming.

2. Steps performed in this activity:

Ques1)

 Accept 10 integer values from the user into the array num
 Then we pass the integer array and its size as a parameter to the function
count
 We traverse through the array and increment integer variable k if an
element is even
 Return the value of k
Ques2)

 We create a double array of 25 elements and accept the values from the
user
 Then we pass the array and its size as a parameter to the max_value()
function
 We create a double variable max initialized to 0 and double pointer m that
points towards the maximum value
 We traverse through the array and if the value of the element is greater
than the value of max variable we assign its value to max and its address to
m. (Repeat this process for all the iterations)
 The double pointer m is returned.

3. What resources / Materials / equipment / tools did you use for this activity?
a) Codeblocks
b) Lecture notes
4) What skills did you acquire?
Use of pointers in c programming
5) Time taken to complete the activity?
3 hrs

You might also like