重要提示:请勿将账号共享给其他人使用,违者账号将被封禁!
查看《购买须知》>>>
首页 > 专业科目
网友您好,请在下方输入框内输入要搜索的题目:
搜题
如搜索结果不匹配,请联系老师获取答案
扫码添加老师QQ
扫码添加老师微信
题目内容 (请给出正确答案)
[单选题]

‎有以下程序‎#include‎void main()‎{int a ;‎scanf("%d",&a);‎if(a >= 0)‎{if

A.-11 is a positive odd number.

B.-11 is a negative odd number.

C.-11 is a positive even number.

D.11 is a negative even number.

答案
查看答案
更多“‎有以下程序‎#include‎void main( )‎{int a ;‎scanf("%d",&a);‎if(a >= 0)‎{if”相关的问题

第1题

#include <stdio.h> #include <stdlib.h> void getmemory(char *p) { p=(char *)

#include <stdio.h>

#include <stdlib.h>

void getmemory(char *p)

{

p=(char *) malloc(100);

strcpy(p,"hello world");

}

int main()

{

char *str=NULL;

getmemory(str);

printf("%s/n",str);

free(str);

return 0;

}

程序崩溃,getmemory中的malloc 不能返回动态内存, free()对str操作很危险

5.char szstr[10];

strcpy(szstr,"0123456789");

产生什么结果?为什么?

点击查看答案

第2题

‏下面程序的输出是()。‏#include‏void main()‏{int a=-1,b=4,k;‏k=(a++<0)&&(!(b--<=0));‏printf("%d,%d,%d%/n",k,a,b);}

A.1,-1,3

B.0,0,3

C.0,-1,2

D.1,0,3

点击查看答案

第3题

有以下程序#includemain(){int y=9 ;for( ; y>0 ; y--)if(y%3==0 ) printf("%d" ,
有以下程序#includemain(){int y=9 ;for(; y>0 ; y--)if(y%3==0 ) printf("%d" ,

有以下程序

#include

main()

{

int y=9 ;

for(; y>0 ; y--)

if(y%3==0 ) printf("%d" , --y) ;}

程序的运行结果是_____

点击查看答案

第4题

有以下程序: public class ConstOver { public ConstOver (int x, int y, int z) { } } 下面

A.protected int ConstOver (){ }

B.private ConstOver (int z, int y, byte x) { }

C.public object ConstOver (int x, int y, int z) { }

D.public void ConstOver (byte x, byte y, byte z) { }

点击查看答案

第5题

以下程序的功能是求两个非0整数相除的商和余数。程序有几处错误,试找出它们加以修改,并上机验证修改结果。 #include iostream using namespace std; int main() {int x,y,r1,r2; cin>>x>>y; if(x=0||y=0..

以下程序的功能是求两个非0整数相除的商和余数。程序有几处错误,试找出它们加以修改,并上机验证修改结果。 #include "iostream" using namespace std; int main() {int x,y,r1,r2; cin>>x>>y; if(x=0||y=0) cout<<”input else { if(x> y) r1=x/y; r2=x%y; else r1=y/x; r2=y%x; } cout<<”商=> <<” 余数="”<"> < <endl; system("pause"); return 0;>

点击查看答案

第6题

改错: #include <stdio.h> int main(void) { int **p; int arr[100]; p = &arr;

改错:

#include <stdio.h>

int main(void) {

int **p;

int arr[100];

p = &arr;

return 0;

}

点击查看答案

第7题

以下程序的输出结果是()#include<stdio.h>main(){ unsigned short a=65537; int b;printf(&quo

以下程序的输出结果是()

#include<stdio.h>

main()

{ unsigned short a=65537; int b;

printf("%d/n" ,b=a);

}

点击查看答案

第8题

#include <stdio.h> void foo(int m, int n) { printf("m=%d, n=%d\n", m, n); } int ma

#include <stdio.h>

void foo(int m, int n)

{

printf("m=%d, n=%d\n", m, n);

}

int main()

{

int b = 3;

foo(b+=3, ++b);

printf("b=%d\n", b);

return 0;

}

点击查看答案

第9题

以下程序的运行结果为()public class IfTest{public static void main(String args[]){int x=3;

A.Not equal

B.Equal

C.无输出

D.编译出错

点击查看答案

第10题

写出以下程序的运行结果

class A

{

int a;

A(int b)

{a=b;}

void show()

{System.out.println(“a=”+a);}

}

public class Class1

{

public static void main (String args[])

{

A bj=new A(12345);

boolean b=false;

char ch=97;

obj.show();

System.out.println(“b=”+b+”/tch=”+ch);

}

}

点击查看答案

第11题

写出以下程序的运行结果。public class Test2 {public static void main(String args[ ]){int i,j

写出以下程序的运行结果。public class Test2 {public static void main(String args[ ]){int i,j;int a[]={17,91,65,35,28};for (i = 0; i < a.length-1; i++ ) {int k = i;for(j = i; j < a.length; j++ )if (a[j]>a[k] )k = j;int temp =a[i];a[i] = a[k];a[k] = temp;}for (i =0; i<a.length; i++ )System.out.print(a[i]+" ");System.out.println();} }

点击查看答案
下载APP
关注公众号
TOP
重置密码
账号:
旧密码:
新密码:
确认密码:
确认修改
购买搜题卡查看答案 购买前请仔细阅读《购买须知》
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《服务协议》《购买须知》
立即支付 系统将自动为您注册账号
已付款,但不能查看答案,请点这里登录即可>>>
请使用微信扫码支付(元)

订单号:

遇到问题请联系在线客服

请不要关闭本页面,支付完成后请点击【支付完成】按钮
遇到问题请联系在线客服
恭喜您,购买搜题卡成功 系统为您生成的账号密码如下:
重要提示:请勿将账号共享给其他人使用,违者账号将被封禁。
发送账号到微信 保存账号查看答案
怕账号密码记不住?建议关注微信公众号绑定微信,开通微信扫码登录功能
请用微信扫码测试
优题宝