-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCODE7.cpp
More file actions
79 lines (63 loc) · 1.78 KB
/
CODE7.cpp
File metadata and controls
79 lines (63 loc) · 1.78 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#include<iostream>
using namespace std;
int main()
{
// int array_1[] = {23, 45, 56, 89};
// for (int i = 0; i<=3; i++)
// {
// /* code */
// cout<<array_1[i]<<endl;
// }
// int numb[] = {2,4,6,8};
// cout<<numb[1];
// int match_w[4];
// match_w[0]=1;
// match_w[1]=45;
// match_w[2]=6;
// match_w[3]=5;
// for (int i = 0; i <=3; i++)
// {
// /* code */
// match_w[1]=60; //<---------YES WE CAN CHANGE THE ARRAY VALUE BY CODE
// cout<<match_w[i]<<endl;
// }
// int i=0;
// int array_1[] = {23, 45, 56, 89};
// do
// {
// cout<<array_1[i]<<endl;
// i++;
// } while (i<=3);
// int num;
// int match_w[4];
// match_w[0] = 1;
// match_w[1] = 45;
// match_w[2] = 6;
// match_w[3] = 5;
// do
// {
// /* code */
// cout<<match_w[num]<<endl;
// num++;
// } while(num<=3);
//
// int i=0;
// do
// {
// /* code */
// i++;
// if (i%2) //<--------------IF YOU WANT TO RUN ALTERNATVE LOOP YOU NEED USE OF MODULUS '%' USING %2 AND %3 BUT NOT %1
// {
// /* code */
// cout<<i<<endl;
// }
// } while (i<50);
int array_1[] = {23, 45, 56, 89};
int* array_p = array_1;
cout<<*(array_p)<<endl;
cout<<*(array_p+1)<<endl;
cout<<*(array_p+2)<<endl; //<---------------IF YOU USE POINTER WITHOUT BRACKET YOU CANTNOT PRINT POITNER ARRAY IN SERISE
cout<<*(array_p+3)<<endl;
//<----------------------Press any key to continue . . . get by this code ------>system("pause");
return 0;
}