D.Y.Patiltechnicalcampus, Talsande Faculty of Engineering & Faculty Ofmanagement (Polytechnic)
D.Y.Patiltechnicalcampus, Talsande Faculty of Engineering & Faculty Ofmanagement (Polytechnic)
PATILTECHNICALCAMPUS, TALSANDE
FACULTY OF ENGINEERING & FACULTY
OFMANAGEMENT
(Polytechnic)
A Microproject Report On
“Report on ALP to sum of smallest
number in Array”
Submitted By
EnrollementNo Name Of Student
2112200050 Aditya Uttam Patil
Guided By
Miss.GuravJ.N.
D.Y.PATILTECHNICALCAMPUS,TALSANDEFACULTYOFENG
INEERING & FACULTYOFMANAGEMENT
(Polytechnic)
DEPARTMENT OF COMPUTER
ENGINEERINGSEMESTER IV
CERTIFICATE
Dr.S.R.Pawaskar
Principal
Date- / /2023
Place-Talsande
Index
1. information 1-2
2. Advantages and 3
Disadvantages
3. Application 4
4. Code 5
5. Conclusion 6
6. Result 7
Report on ALP to sum of smallest number in Array
What is Array: -
An array is a collection of similar data elements stored at contiguous memory locations. It is
the simplest data structure where each data element can be accessed directly by only using its
index number.
For instance, if we want to store the marks scored by a student in 5 subjects, then there’s no
need to define individual variables for each subject. Rather, we can define an array that will
store the data elements at contiguous memory locations.
Array marks [5] define the marks scored by a student in 5 different subjects where each
subject’s marks are located at a particular location in the array, i.e., marks [0] denote the marks
scored in the first subject, marks [1] denotes the marks scored in 2nd subject and so on.
In C language, the array has a fixed size meaning once the size is given to it, it cannot be
changed i.e., you can’t shrink it nor can you expand it. The reason was that for expanding if
we change the size, we can’t be sure (it’s not possible every time) that we get the next memory
location to us for free. The shrinking will not work because the array, when declared, gets
memory statically allocated, and thus compiler is the only one that can destroy it .
By default, the array is uninitialized, and no elements of the array are set to any value.
However, for the proper working of the array, array initialization becomes important. Array
initialization can be done by the following methods:
o Passing no value within the initializer
o By passing specific values within the initializer
o By passing specific values within the initializer but not declaring the size
o Universal Initialization
In programming, most of the cases need to store a large amount of data of a similar type. We
need to define numerous variables to store such a huge amount of data. While writing the
programs, it would be very tough to memorize all variable names. Instead, it is better to define
an array and store all the elements in it.
You can’t change the size i.e., once you have declared the array you can’t change its size
because of static memory allocation. Here Insertion(s) and deletion(s) are difficult as the
elements are stored in consecutive memory locations and the shifting operation is costly too.
Applications on Array
Code: -
Output: -l 1
Smallest: 1
Smallest: 22
Conclusion: -
Before we finish, here is a few definitions of the word "array" in different subjects...
In maths, an array is an arrangement of numeric values or symbols, arranged in rows and
columns.
In computing, an array is a series of objects that are the same size and type, or an indexed set
of related values.
And in general, the term "array" is used to describe an impressive or vast amount of a
particular type of item. He had a vast array of science fiction movies on his stall.
Reference: -
https://www.geeksforgeeks.org/smallest-number-to-make-array-sum-at-most-k-by-
dividing-each-element/
https://www.geeksforgeeks.org/sum-and-product-of-minimum-and-maximum-
element-of-an-array/
https://www.bietdvg.edu/media/department/EI/data/learning-
materials/arm_Lab_manual.pdf
https://www.geeksforgeeks.org/maximum-sum-of-smallest-and-second-smallest-in-
an-array/
https://mjcollege.ac.in/images/labmannuals/IV%20EIE%20I%20SEM%20MPMC%2
0LAB%20MANUAL(EE432).pdf