#include <iostream>
using namespace std;
int main(){
//求两数之和
int a,b,sum;
a=11;
b=22;
sum=a+b;
cout<<"两个数a与b的和是"<<"sum="<<sum;
}
compare with the up program, think the output?
#include <iostream>
using namespace std;
int main(){
//求两数之和sum的值是什么?
int a,b,sum;
sum=a+b;
a=11;
b=22;
cout<<"两个数a与b的和是"<<"sum="<<sum;
}
what 's the result?
//内存当中生命变量之后是开辟了一个内存空间,没有赋值
//之前变量当中有内存中原来的内容