更多"以下程序不用第3个变量实现将两个数进行对涮的操作,画线处应为( )。"的相关试题:
[单项选择]若有以下程序段:
void x(int n);
void main( )
void x(int n);
x(5);
void x(int n)
cout<<n:
则以下叙述不正确的是 ______。
A. 若只在子函数中对函数x进行声明,则只能在主数中正确调用函数x
B. 若只在子函数前面对函数x进行声明,则其后的所有函数中都可以正确调用函数x
C. 对于以上程序,编译时系统会提示出错信息:提示对x函数重复声明
D. 函数x无返回值,所以可用void定义x的函数类型
[单项选择]有以下程序
#include<iostream.h>
void main( )
{ int a=5,b=0,c=0;
if(a=b+c) cout<<"* * *" <<endl;
else cout<<"$$$"<<endl;}
下列选项叙述正确的是( )。
A. 有语法错不能通过编译
B. 可以通过编译但不能通过连接
C. 输出* * *
D. 输出 $ $ $
[单项选择]有以下程序
#include<stdio.h>
void main( )
int n=2,k=1;
while(!(k>0||n++));
printf("%d %d/n",k,n);
程序运行后的输出结果是( )。
A. 0 2
B. 1 3
C. 5 7
D. 1 2
[单项选择]阅读以下程序
#include<iostream.h>
void main( )
char line[10];
cin>>line;
cout<<line<<endl;
如运行时输入This is example.<CR>,则程序的输出结果是
A. This
B. This is
C. This is a
D. This is an example.
[单项选择]有以下程序
#include"iostream.h"
void main( )
int i=1,j=1,k=2;
if( (j++||k++)&&i++)
cout < < i < < "," < < j < < "," < < k;
cout< <end1;
执行后输出结果是
A. 1,1,2
B. 2,2,1
C. 2,2,2
D. 2,2,3