若有以下定义:int arr[]={6,7,8,9,10};int *ptr=NULL;ptr=arr;*(ptr+2)+=2;printf("%d,%d\n",*ptr,*(ptr+2));则程序段的输出结果为()。
A: 8,10
B: 6,8
C: 7,9
D: 6,10
A: 8,10
B: 6,8
C: 7,9
D: 6,10
举一反三
- 若有以下定义:int arr[]={6,7,8,9,10};int *ptr=NULL;ptr=arr;*(ptr+2)+=2;printf("%d,%d\n",*ptr,*(ptr+2));则程序段的输出结果为()。 A: 8,10 B: 6,8 C: 7,9 D: 6,10
- 下面程序段的输出结果为().int *ptr;int arr[]={6,7,8,9,10};ptr=arr;*(ptr+2)+=2;printf("%d,%d\n", *ptr, *(ptr+2)); A: 8,10 B: 6,8 C: 7,9 D: 6,10
- 下列程序段的输出结果为:int arr[]={6,7,8,9,10};int * ptr;ptr=arr;* (ptr+2)+=2; printf ("%d,%d\n",*ptr,*(ptr+2)); A: 8,10 B: 6,8 C: 7,9 D: 6,10
- 设有如下定义:int arr[ ] = {6, 7, 8, 9, 10}; int *ptr; ptr = arr; *(ptr + 2) += 2;printf("%d, %d ", *ptr, *(ptr + 2));则程序段的输出结果为( )。 A: 8, 10 B: 6, 8 C: 7, 9 D: 6, 10
- 设有定义: int arr[ ]={6,7,8,9,10}, *ptr =arr; <br/>则下列程序段的输出结果为_________。()<br/>*(ptr+2)+=2; printf ("%d , %d\n", *ptr, *(ptr+2)); A: 8,10 B: 6,8 C: 7,9 D: 6,10