单项选择题
下面程序错误的语句是( )。 ①# include <iostream.h> ② void main( ) ③ { ④ int * p=new int[1]; ⑤ p=9; ⑥ cout << * p << endl; ⑦ delete [ ]p; ⑧ }
单项选择题 设变量已正确定义,则以下能正确计算 f=n!的程序段是______。
单项选择题 若要求从键盘读入含有空格字符的字符串,应该使用函数______。
单项选择题 下面程序的运行结果为( )。#include <iostream.h>void swap(int &a,int b){int temp;temp=a++;a=b;b=temp;}void main( ){int a=2,b=3;swap(a,b);cout<<a<<"," <<B<<ENDL;}