单选题 下面程序的输出结果是( )。   # include <iostream.h>   class example   {     int a;   public:     example (intb) {a=b++;}     void print ( ){a=a+1; cout << a <<" ";}     void print ( ) const {cout << a <<" ";}   };   void main ( )   {     example x (3);     const example y (2);     x. print ( );     y.print ( );   }
【正确答案】 C
【答案解析】“++”是右结合的,所以先赋值为3,最后输出3+1;常成员函数只有常对象才能调用,所以输出2。