Datastructurespart 2
Datastructurespart 2
Prepared By
Asst.Prof.Deepali P.Pawar
Referred By
Iinkin.com,bhavnakhivsara.wordpress.co
mtutorialspoint.com
What is Data And Information?
What is Data And Information
What is Data Structures?
Data Structure: a data structure
is a particular way of storing and
organizing data in a computer so that
it can be used efficiently.
Data structure is a particular way of
storing and organizing information in
a computer so that it can be
retrieved and used most productively.
What is Data Structures?
Data structures are used in almost
every program or software system.
Data Objects
Refer to a run time grouping of one or more
pieces of data in virtual computer.
It is container for data values –a place where
Ex-double balance[10];
Arrays
Initializing Arrays
scanf(“%d”,&size);
for(i=0;i<size;i++)
{
scanf(“%d”,&a[i]);
} //end for
for(i=0;i<size;i++)
{
printf(“The array is %d”,a[i]); //Displaying Array
} //end for
return 0;
Output will be
1
2
3
4
5
Multi-dimensional Arrays in C
type name[size1][size2]...[sizeN];
Two-dimensional Arrays in C
Ex-int threedim[5][10][4];
Passing Arrays as Function
Arguments in C