Заагч алхам алхмаарint x=1, y=2, z[10]={5,6,7}; int *ip; /* ip нь з аагч int -г заана */ ip = &x; /* ip now points to x */ printf("ip now points to x that contains the value %d\n",*ip); y = *ip; /* y is now 1 */ printf("y is now %d\n",y); *ip = 0; /* x is now 0 */ printf("x is now %d\n",x); ip = &z[2]; /* ip now points to z[2] */ printf("ip now points to z[2] that contains the value %d\n",*ip); *ip = 1; /* z[2] is now 1 */ printf("z[2] is now %d\n", z[2]); printf("ip is %p\n", ip); x y z ip 1 2 364 5 6 7 Z[0] Z[1] Z[2] 120 248 364 368 372 … 564 772
10.
Заагч алхам алхмаарint x=1, y=2, z[10]={5,6,7}; int *ip; /* ip нь з аагч int -г заана */ ip = &x; /* ip now points to x */ printf("ip now points to x that contains the value %d\n",*ip); y = *ip; /* y is now 1 */ printf("y is now %d\n",y); *ip = 0; /* x is now 0 */ printf("x is now %d\n",x); ip = &z[2]; /* ip now points to z[2] */ printf("ip now points to z[2] that contains the value %d\n",*ip); *ip = 1; /* z[2] is now 1 */ printf("z[2] is now %d\n", z[2]); printf("ip is %p\n", ip); x y z ip 1 2 364 5 6 7 Z[0] Z[1] Z[2] 120 248 364 368 372 120 564 772
11.
Заагч алхам алхмаарint x=1, y=2, z[10]={5,6,7}; int *ip; /* ip нь з аагч int -г заана */ ip = &x; /* ip now points to x */ printf("ip now points to x that contains the value %d\n",*ip); y = *ip; /* y is now 1 */ printf("y is now %d\n",y); *ip = 0; /* x is now 0 */ printf("x is now %d\n",x); ip = &z[2]; /* ip now points to z[2] */ printf("ip now points to z[2] that contains the value %d\n",*ip); *ip = 1; /* z[2] is now 1 */ printf("z[2] is now %d\n", z[2]); printf("ip is %p\n", ip); x y z ip 1 2 364 5 6 7 Z[0] Z[1] Z[2] 120 248 364 368 372 120 564 772
12.
Заагч алхам алхмаарint x=1, y=2, z[10]={5,6,7}; int *ip; /* ip нь з аагч int -г заана */ ip = &x; /* ip now points to x */ printf("ip now points to x that contains the value %d\n",*ip); y = *ip; /* y is now 1 */ printf("y is now %d\n",y); *ip = 0; /* x is now 0 */ printf("x is now %d\n",x); ip = &z[2]; /* ip now points to z[2] */ printf("ip now points to z[2] that contains the value %d\n",*ip); *ip = 1; /* z[2] is now 1 */ printf("z[2] is now %d\n", z[2]); printf("ip is %p\n", ip); x y z ip 1 1 364 5 6 7 Z[0] Z[1] Z[2] 120 248 364 368 372 120 564 772
13.
Заагч алхам алхмаарint x=1, y=2, z[10]={5,6,7}; int *ip; /* ip нь з аагч int -г заана */ ip = &x; /* ip now points to x */ printf("ip now points to x that contains the value %d\n",*ip); y = *ip; /* y is now 1 */ printf("y is now %d\n",y); *ip = 0; /* x is now 0 */ printf("x is now %d\n",x); ip = &z[2]; /* ip now points to z[2] */ printf("ip now points to z[2] that contains the value %d\n",*ip); *ip = 1; /* z[2] is now 1 */ printf("z[2] is now %d\n", z[2]); printf("ip is %p\n", ip); x y z ip 1 1 364 5 6 7 Z[0] Z[1] Z[2] 120 248 364 368 372 120 564 772
14.
Заагч алхам алхмаарint x=1, y=2, z[10]={5,6,7}; int *ip; /* ip нь з аагч int -г заана */ ip = &x; /* ip now points to x */ printf("ip now points to x that contains the value %d\n",*ip); y = *ip; /* y is now 1 */ printf("y is now %d\n",y); *ip = 0; /* x is now 0 */ printf("x is now %d\n",x); ip = &z[2]; /* ip now points to z[2] */ printf("ip now points to z[2] that contains the value %d\n",*ip); *ip = 1; /* z[2] is now 1 */ printf("z[2] is now %d\n", z[2]); printf("ip is %p\n", ip); x y z ip 0 1 364 5 6 7 Z[0] Z[1] Z[2] 120 248 364 368 372 120 564 772
15.
Заагч алхам алхмаарint x=1, y=2, z[10]={5,6,7}; int *ip; /* ip нь з аагч int -г заана */ ip = &x; /* ip now points to x */ printf("ip now points to x that contains the value %d\n",*ip); y = *ip; /* y is now 1 */ printf("y is now %d\n",y); *ip = 0; /* x is now 0 */ printf("x is now %d\n",x); ip = &z[2]; /* ip now points to z[2] */ printf("ip now points to z[2] that contains the value %d\n",*ip); *ip = 1; /* z[2] is now 1 */ printf("z[2] is now %d\n", z[2]); printf("ip is %p\n", ip); x y z ip 0 1 364 5 6 7 Z[0] Z[1] Z[2] 120 248 364 368 372 120 564 772
16.
Заагч алхам алхмаарint x=1, y=2, z[10]={5,6,7}; int *ip; /* ip нь з аагч int -г заана */ ip = &x; /* ip now points to x */ printf("ip now points to x that contains the value %d\n",*ip); y = *ip; /* y is now 1 */ printf("y is now %d\n",y); *ip = 0; /* x is now 0 */ printf("x is now %d\n",x); ip = &z[2]; /* ip now points to z[2] */ printf("ip now points to z[2] that contains the value %d\n",*ip); *ip = 1; /* z[2] is now 1 */ printf("z[2] is now %d\n", z[2]); printf("ip is %p\n", ip); x y z ip 0 1 364 5 6 7 Z[0] Z[1] Z[2] 120 248 364 368 372 372 564 772
17.
Заагч алхам алхмаарint x=1, y=2, z[10]={5,6,7}; int *ip; /* ip нь з аагч int -г заана */ ip = &x; /* ip now points to x */ printf("ip now points to x that contains the value %d\n",*ip); y = *ip; /* y is now 1 */ printf("y is now %d\n",y); *ip = 0; /* x is now 0 */ printf("x is now %d\n",x); ip = &z[2]; /* ip now points to z[2] */ printf("ip now points to z[2] that contains the value %d\n",*ip); *ip = 1; /* z[2] is now 1 */ printf("z[2] is now %d\n", z[2]); printf("ip is %p\n", ip); x y z ip 0 1 364 5 6 7 Z[0] Z[1] Z[2] 120 248 364 368 372 372 564 772
18.
Заагч алхам алхмаарint x=1, y=2, z[10]={5,6,7}; int *ip; /* ip нь з аагч int -г заана */ ip = &x; /* ip now points to x */ printf("ip now points to x that contains the value %d\n",*ip); y = *ip; /* y is now 1 */ printf("y is now %d\n",y); *ip = 0; /* x is now 0 */ printf("x is now %d\n",x); ip = &z[2]; /* ip now points to z[2] */ printf("ip now points to z[2] that contains the value %d\n",*ip); *ip = 1; /* z[2] is now 1 */ printf("z[2] is now %d\n", z[2]); printf("ip is %p\n", ip); x y z ip 0 1 364 5 6 1 Z[0] Z[1] Z[2] 120 248 364 368 372 372 564 772
19.
Заагч алхам алхмаарint x=1, y=2, z[10]={5,6,7}; int *ip; /* ip нь з аагч int -г заана */ ip = &x; /* ip now points to x */ printf("ip now points to x that contains the value %d\n",*ip); y = *ip; /* y is now 1 */ printf("y is now %d\n",y); *ip = 0; /* x is now 0 */ printf("x is now %d\n",x); ip = &z[2]; /* ip now points to z[2] */ printf("ip now points to z[2] that contains the value %d\n",*ip); *ip = 1; /* z[2] is now 1 */ printf("z[2] is now %d\n", z[2]); printf("ip is %p\n", ip); x y z ip 0 1 364 5 6 1 Z[0] Z[1] Z[2] 120 248 364 368 372 372 564 772
20.
Заагч алхам алхмаарint x=1, y=2, z[10]={5,6,7}; int *ip; /* ip нь з аагч int -г заана */ ip = &x; /* ip now points to x */ printf("ip now points to x that contains the value %d\n",*ip); y = *ip; /* y is now 1 */ printf("y is now %d\n",y); *ip = 0; /* x is now 0 */ printf("x is now %d\n",x); ip = &z[2]; /* ip now points to z[2] */ printf("ip now points to z[2] that contains the value %d\n",*ip); *ip = 1; /* z[2] is now 1 */ printf("z[2] is now %d\n", z[2]); printf("ip is %p\n", ip); x y z ip 0 1 364 5 6 1 Z[0] Z[1] Z[2] 120 248 364 368 372 372 564 772
Заагч ба Массив S массивын энхий элемент S[0] нь түүний хаягийг хадгалж байдаг S нь үнэндээ бол S[0] -г заах заагч юм int S[10]; int *P; P=S; /* P ба S нь адил */ P ба S хоёул S[0] -г заана