-
Notifications
You must be signed in to change notification settings - Fork 0
/
array.cpp
38 lines (32 loc) · 870 Bytes
/
array.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
int marks[] = {23,45,56,78};
int i = 0; /*here [ signifies the no. of size to be 4] 23in 0 positiion 45 iin 1 positiioon */
/* cout <<marks[2]<<endl;
marks[3] = 90; //*value of array can be changed*/
// cout<<marks[3]<<endl;
/* printing all the array value with the help of loop*/
/* for ( i = 0; i < 4; i++)
{
// /* code */
// cout<<marks[i]<<endl;
/* do
{
// /* code *//*cout <<marks[i]<<endl;*/
// i++;
// } while (i<4);
while (i<4)
{
/* code */cout<<marks[i]<<endl;
i++;
}
return 0;
}
/*#include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
/* in array int marks[n] means n number of integer(size) is stored in the marks*/
// return 0;//