更多"以下程序的输出结果是 【8】 。
main( )
{
"的相关试题:
[填空题]以下程序的输出结果是 【7】 。
main( )
{ unsigned short a=65536; int b;
printfC%d/n",b=a);
}
[填空题]以下程序的输出结果是 【7】 。
main( )
unsigned short a=65536; int b;
printf("%d/n",b=A) ;
[填空题]以下程序的输出结果是 【7】 。
main( )
unsigned short a=65536; int b;
printfC%d/n",b=a);
[填空题]以下程序的输出结果是 【7】 。
main( )
unsigned short a=65536;int b;
printf("%d/n",b=A) ;
[填空题]以下程序的输出结果是______。
void main( )
unsigned short a=65536;int b;
printf("%d/n",b=a);
[填空题]以下程序的输出结果是______。
main( )
unsigned short a=65536;int b;
printf("%d/n",b=A) ;
[简答题]请编写一个函数unsigned short fun(unsigned short s)。其中s是一个大于10的无符号整数,若s是一个n(n≥2)位整数,函数求出s的n位数之和作为函数的返回值。
例如,s值为4315,则函数返回13。s值为13函数,则返回4。
注意:部分源程序已存在文件PROC15.cpp中。
请勿修改主函数和其他函数中的任何内容,仅在函数fun( )的花括号中填写若干语句。
文件PROC15.cpp的内容如下:
//PROC15.cpp
#include<iostream>
using namespace std;
unsigned short fun(unsigned short s);
int main( )
{
unsigned short a;
cout<<"Enter a unsigned short integer number:";
cin>>a;
if(a<10)
cout<<"Data error!";
else
cout<<"The result: "<<fun(a)<<end1;
return 0;
}
unsigned short fun(unsigned short s)
{
//* * * * * *
}
[简答题]以下程序输出的结果是:
#include "stdio.h"
void main( )
{
char s[]="hello/nworld";
printf("%s",s);
}
[填空题]以下程序输出的结果是 。
#include<iostream.h>
void main( )
int a=5,b=4,c=3,d;
d=(a>b>c) ;
cout < < d;
[单项选择]以下程序输出结果是
#include <stdio.h>
main ( )
{ int i=0,a=0;
while ( i<2 0 )
{ for(;;)
{ if ((i%10) ==0) break;
else i--;
}
i+=11; a+=i;
}
print f ( "%d/n" ,
A. ;
[填空题]以下程序输出的结果是 【10】 。
#include<iostream.h>
void main( )
int a=5,b=4,c=3,d;
d=(a>b>c);
cout<<d;
[简答题]以下程序输出的结果是:
#include "stdio.h"
void main( )
{char ch[]="I love Great Wall of China!";
printf("%c",*(ch+5));
}