变量初始化问题
当局部变量被定义时,系统不会自动对其初始化;
当全局变量被定义时,系统会初始化为下列值:
数据类型 | 初始化默认值 |
---|---|
int | 0 |
float | 0 |
double | 0 |
char | ‘\0’ |
pointer | NULL |
Problem Description |
---|
Your task is to Calculate a + b. Too easy?! Of course! I specially designed the problem for acm beginners. You must have found that some problems have the same titles with this one, yes, all these problems were designed for the same aim |
Input |
The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line. |
Output |
For each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input. |
Sample Input |
1 6 1 20 |
Sample Output |
7 21 |
https://www.runoob.com/w3cnote/cpp-keyword-intro.html
asm | else | new | this |
---|---|---|---|
auto | enum | operator | throw |
bool | explicit | private | true |
break | export | protected | try |
case | extern | public | typedef |
catch | false | register | typeid |
char | for | return | union |
const | friend | short | unsigned |
const_cast | goto | signed | using |
continue | if | sizeof | virtual |
default | inline | static | void |
delete | int | static_cast | volatile |
do | long | struct | wchar_t |
double | mutable | switch | while |
dynamic_cast | namespace | template | … |