填空题
若有如下程序段:
#include<iostream>
using namespace std;
int main()
char *p="abcdefgh",*r;
long *q;
q=(long*)p;q++;
r=(char*)q;
cout<<r<<endl;
return 0;
该程序的输出结果是
【10】
。
【参考答案】
efgh
点击查看答案
<上一题
目录
下一题>
热门
试题
填空题
函数swap(arr,n)可完成对arr数组从第1个元素到第n个元素两两交换。在运行调用函数中的语句后,a[0]和a[1]的值分别为 【7】 。 a[0]=1;a[1]=2;swap(a,2);
点击查看答案
填空题
阅读下面的程序: #include<iomanip.h> void main() cout.fill(’!’); cout<<setiosflags(ioS::left)< cout<<setw(6)<<1024<<endl; 写出该程序的输出结果: 【11】 。
点击查看答案
相关试题
阅读以下程序: #include<iostream.h>...
以下程序的执行结果是 【12】 。 #in...
请定义一个函数名为A,返回值为int,没有参...
执行以下程序后,输出“#”号的个数是 【...