1.A good programmer is someone who always looks both ways before crossing a one-way street. (Doug Linder) 好的程序员即使在过单行道时也总是会环顾两边. 2.Don’t worry if it doesn’t work right. If everything did, you’d be out of a job. (Mosher’s Law of Software Engineering)
1.下面程序的输出结果是? #include<stdio.h> main(){ int b=3; int arr[]={6,7,8,9,10}; int *ptr=arr; *(ptr++)+=123; printf("%d,%d\n",*ptr,*(++ptr)); } 答案: 8,8 c中printf计算参数时是从右到左压栈的. 2.下面程序的输出结果? #include<iostream> using namespace std; int main(){