- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharray.cpp
More file actions
Latest commit
29 lines (27 loc) · 641 Bytes
/
Copy patharray.cpp
File metadata and controls
29 lines (27 loc) · 641 Bytes
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
// #include <stdio.h>
// int main()
// {
// char a[] = { 'A', 'B', 'C', 'D' };
// char* ppp = &a[0];
// printf("%d %c", ppp, *ppp++); // Line 1
// printf("%d %c", ppp, *--ppp);
// printf("%d %c", ppp, *ppp);
// printf("%d %c", ppp, ++(*ppp));
// printf("%d %c \n", ppp, ++(*ppp));
// printf("%c %c ", *++ppp, ++(*ppp)); // Line 2
// for(int i =0 ; i < 4; i++) {
// printf("\n");
// printf("%c", a[i]);
// }
// }
#include<stdio.h>
intmain()
{
int arr[] = {1, 2, 3, 4, 5};
int *p = arr;
++*p;
p += 2;
printf("%d \n", *p);
printf("%d", arr[1]);
return0;
}