0% found this document useful (0 votes)
11 views7 pages

Multidimensional Arrays in C/C++

The document discusses multidimensional arrays, specifically focusing on 1D, 2D, and 3D arrays. It includes the syntax for declaring an array in C/C++ and provides a coding example to read and calculate the average and total of marks for five subjects. The document is authored by Chaitali Patil, an Assistant Professor at K.K.Wagh Institute of Engineering Education and Research, Nashik.

Uploaded by

pcfad009
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)
11 views7 pages

Multidimensional Arrays in C/C++

The document discusses multidimensional arrays, specifically focusing on 1D, 2D, and 3D arrays. It includes the syntax for declaring an array in C/C++ and provides a coding example to read and calculate the average and total of marks for five subjects. The document is authored by Chaitali Patil, an Assistant Professor at K.K.Wagh Institute of Engineering Education and Research, Nashik.

Uploaded by

pcfad009
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

Multidimensional Arrays

BY CHAITALI PATIL

Assistant Professor,Dept. of Computer Engg.


[Link] Institute of Engineering Education
and Research, Nashik
Video link
2

 Array Data Structure (1D 2D & 3D Array)


 [Link]

Chaitali Patil
?
3

 Why we need array?


 What is the syntax to declare array in C/C++ to store
100 integer numbers?

Chaitali Patil
?
4

 Why we need array?


 What is the syntax to declare array in C/C++ to store
100 integer numbers?
int array_name[100]
e.g. int marks[100]

First 5 questions from supercampus

Chaitali Patil
5

 Write a code in C or C++ to read the marks of 5


subjects of a student , and find the average and total
of the marks and print it.

 [Link]

Chaitali Patil
6

#include <iostream>
using namespace std;
int main(){ cout<<"Hello World";
int i,total,avg,marks[5];
cout<<"Enter the marks of 5 students"<<endl;
for(i=0;i<5;i++)
cin>>marks[i];
cout<<"marks are :: "<<endl;
for (i=0;i<5;i++)
cout<<marks[i]<<endl;
return 0;
}

Chaitali Patil
Thank You

Chaitali Patil

You might also like