computer 版 (精华区)

发信人: remember (明天会更好), 信区: program
标  题: C++自测题(3)
发信站: 听涛站 (2001年09月30日16:15:16 星期天), 站内信件

(3)About operator ++
大家还是先想想程序的执行结果吧:

#include <iostream.h>

int main()
{
   int data[]={1,10,100};
   int *i=data;

   cout<<*i<<endl;
   cout<<++*i<<endl;
   cout<<*i++<<endl;
   cout<<*i<<endl;

   return 0;
}

--
    洛阳亲友如相问  一片冰心在玉壶
※ 来源:·听涛站 tingtao.dhs.org·[FROM: 匿名天使的家] 
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:1.258毫秒