首页/ 题库 / [单选题]试题25若有定义语句:int year=的答案

试题25若有定义语句:int year=2009,*p=&year; , 以下不能使变量year 中的值增至2010的语句是()

单选题
2022-01-02 04:00
A、*p+=1;
B、(*p)++;
C、++(*p);
D、*p++;
查看答案

正确答案
D

试题解析
试题25分析A,B,C都是使p所指单元的值增1,而D是使指针往后移一位。试题25答案D

标签:
相关题目
若有定义语句:int a[2][3],*p[3];,则以下语句中正确的是(  )。
若有以下变量定义和函数调用语句: int a=25; print_value(&a); 则执行下面函数后正确的输出结果是( )。 void print_value(int*x) { cout<<++*x<<endl; }
若有以下变量定义和函数调用语句: int a=5; fun(&a); 则执行下面函数后正确的输出结果是( )。 void fun(int*x) { cout<<++*x<<end1; }
若有定义语句:“int year=2009,*p=&year;”,以下不能使变量year中的值增至2010的语句是(  )。
试题25若有定义语句:int year=2009,*p=&year; , 以下不能使变量year 中的值增至2010的语句是()
已知year为整型变量,不能使表达式(year%4==0&&year%100!=O)||year%400==0的值为“真”的数据是______。
有以下程序: Class Date {public: Date(int y,int m,int d); {year=y; month=m; day=d;} Date(int y=2000) {year=y; month=10; day=1;) Date(Date &D) {year=d.year; month=d.month; day=d.day;} void print() {cout<<year<<“.”<<mo
若有定义语句:int a[2][3],*p[3];,则以下语句中正确的是(  )。
若有定义语句:int a[2][3],*p[3];,则以下语句中正确的是( )。
若有定义语句:int a[21[3],* P[3];则以下语句中正确的是( )。
若有定义语句:int a[2][3],*p[3];,则以下语句中正确的是( )。
若有定义语句:int a[2][3],*p[33;,则以下语句中正确的是( )。
若有定义语句: int a[2][3],*p[3]; ,则以下语句中正确的是
若有定义:int x=0, *p=&x;, 则语句 printf("%d ",*p);的输出结果是( )。
若有定义:int x=0,*p=&x;则语句printf("%d ",*p);的输出结果是( )。
若有定义:int x=0,*p=&x;,则语句printf("%d ",*p);的输出结果是
若有定义int x=0,*p=&x;,则语句printf("%d ",*p);的输出结果是 ______。
若有定义:int x=0,*p=&x;,则语句printf("%d ",*p);的输出结果是 ______。
设有定义:int n1=0,n2,*p=&n2,*q=&n1;,以下赋值语句中与n2=n1;语句等价的是( )。
设有定义:int n1=0, n2, *p=&n2, *q=&n1;以下赋值语句中与n2=n1语句等价的是( )。
广告位招租WX:84302438

免费的网站请分享给朋友吧