1647: 数组的指针
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Special Judger
Creator:
Submit:69
Solved:6
Description
请选择以下(1) ~ (6) 处的输出。
#include <stdio.h> int main() { int v[3] = { 10 100 200 }; int* ptr; ptr = v; for (int i = 0; i < 3; i++) { printf("Value of *ptr = %d\n" *ptr); printf("Value of ptr = %p\n\n" ptr); ptr++; } return 0; }
输出
Value of *ptr = (1)
Value of ptr = (2)
Value of *ptr = (3)
Value of ptr = (4)
Value of *ptr = (5)
Value of ptr = (6)
A.0x7ffe8ba7ec50 B.0x7ffe8ba7ec51 C.0x7ffe8ba7ec52 D.0x7ffe8ba7ec53
E.0x7ffe8ba7ec54 F.0x7ffe8ba7ec55 G.0x7ffe8ba7ec56 H.0x7ffe8ba7ec57
I.0x7ffe8ba7ec58 J. 10 K. 100 L. 200
Sample Input Copy
Sample Output Copy