单选题:已知文本文件的内容是字符串“Manam I’m Adam”,下列语句中哪一项的输出不是“dam”:\_\_\_\_。
已知文本文件的内容是字符串“Manam I’m Adam”,下列语句中哪一项的输出不是“dam”:\_\_\_\_。 @[C](2)
A. char str[30]; ifile.seekg(11, ios::beg); ifile.getline(str, 30); cout << str << endl;
B. char str[30]; ifile.seekg(11, ios::beg); ifile.get(str, 30); cout << str << endl;
C. char str[30]; ifile.seekg(2, ios::beg); ifile.getline(str, 30); cout << str << endl;
D. char str[30]; ifile.seekg(11, ios::beg); ifile.get(str, 20); cout << str << endl;
A.char str[30]; ifile.seekg(11, ios::beg); ifile.getline(str, 30); cout << str << endl;
B.char str[30]; ifile.seekg(11, ios::beg); ifile.get(str, 30); cout << str << endl;
C.char str[30]; ifile.seekg(2, ios::beg); ifile.getline(str, 30); cout << str << endl;
D.char str[30]; ifile.seekg(11, ios::beg); ifile.get(str, 20); cout << str << endl;
答案:C
A. char str[30]; ifile.seekg(11, ios::beg); ifile.getline(str, 30); cout << str << endl;
B. char str[30]; ifile.seekg(11, ios::beg); ifile.get(str, 30); cout << str << endl;
C. char str[30]; ifile.seekg(2, ios::beg); ifile.getline(str, 30); cout << str << endl;
D. char str[30]; ifile.seekg(11, ios::beg); ifile.get(str, 20); cout << str << endl;
A.char str[30]; ifile.seekg(11, ios::beg); ifile.getline(str, 30); cout << str << endl;
B.char str[30]; ifile.seekg(11, ios::beg); ifile.get(str, 30); cout << str << endl;
C.char str[30]; ifile.seekg(2, ios::beg); ifile.getline(str, 30); cout << str << endl;
D.char str[30]; ifile.seekg(11, ios::beg); ifile.get(str, 20); cout << str << endl;
答案:C