网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
有如下程序:#includemain(){ int x=072; printf(%d,x+1);}程序运行后的输出结果是(  )。
A

59

B

73

C

115

D

72


参考答案

参考解析
解析:
整型常量有3种,①十进制整常量,没有前缀,输出格式控制符为%d;②八进制整常量,以0作为前缀,输出格式控制符为%o;③十六进制整常量,以0X或0x作为前缀,输出格式控制符为%x。八进制数072表示成十进制数为58,即x=072=58,以十进制格式输出x+1=59,答案选择A选项
更多 “单选题有如下程序:#includemain(){ int x=072; printf(%d,x+1);}程序运行后的输出结果是(  )。A 59B 73C 115D 72” 相关考题
考题 阅读下面程序,则程序的执行结果为 【10】 。#include "stdio.h"main(){ int a=10;fun(a);printf( "%d\n",a);}fun(int x){ x=50;}

考题 为使*p=20,下面正确的程序是()A. include main( ) { int a=10,b=20,*p= printf 为使*p=20,下面正确的程序是 ( )A.# include<stdio.h> main( ) { int a=10,b=20,*p=&b; printf("%d\t%d\n",p,*p); } *p)B.# include<stdio.h> main( ) { int a=10,b=20,*p=b; printf("%d\t\%d\n",p,*p) }C.# include<stdio.h> main( ) { int a=10,b=20,*p; p=&a; p + +; printf("%d\t\%d\n",p,*p);} }D.# include<stdio.h> main( ) { int a=10,b=20,*p; *p=20; printf("%d\t\%d\n",p,*p); }

考题 下列程序的输出结果是()。 include VOid p(int *x) {printf("%d",++*x); } void main() 下列程序的输出结果是( )。#include<stdio.h>VOid p(int *x){ printf("%d",++*x);}void main(){ int y=3;p(y);}A.3B.4C.2D.5

考题 现有如下程序段,则程序段的输出结果为 【16】 。#include "stdio.h"int fun(){static int k;return k;}main(){int m;m=fun();printf("%d\n",m);}

考题 阅读下面程序,则程序的执行结果为( )。 include"stdio.h" main() {int a=10; fun(A); printf("%d\n",A);} fun(int x) {x=50;}

考题 下列程序的输出结果是()。includevoid p(int *x){printf("%d",++*x);}void main(){int 下列程序的输出结果是( )。 #include<stdio.h> void p(int *x) { printf("%d",++*x); } void main() { int y=3; p(y); }A.3B.4C.2D.5

考题 以下程序的输出结果是( )。 include void fun(int x) {if(x/2>0)fun(x/2); printf("%d", 以下程序的输出结果是( )。include<stdio.h>void fun(int x){ if(x/2>0)fun(x/2);printf("%d",x);}main(){fun(3);printf("\n");}

考题 有以下程序: include main ( ) int i;for(i =0;i 有以下程序: #include <stdio.h> main ( ) int i; for(i =0;i <3 ;i ++ ) switch (i) case 0: printf(" % d" ,i); case 2: printf(" % d" , i); default: printf( "% d" , i);程序运行后的输出结果是( )。A.22111B.21021C.122D.12

考题 有如下程序:includeint func(int a,int b){return(a+b):}main(){int x=2,y=5,z=8,r; r 有如下程序: #include <stdio.h> int func(int a,int b) { return(a+b):} main() { int x=2,y=5,z=8,r; r=func(func(x,y),z); printf("%d\n",r); } 该程序的输出结果是( )。A.12B.13C.14D.15

考题 有以下程序:include main(){ inta=1,b=2,c=3,x; x=(ab)c; printf("%d\n",x);}程 有以下程序: #include <stdio.h> main() { int a=1,b=2,c=3,x; x=(ab)c; printf("%d\n",x); } 程序的运行结果是( )。A.0B.1C.2D.3

考题 有以下程序 include define F(X,Y) (X)*(Y) main( ) { int a=3, b=4; prin 有以下程序#include <stdio.h>#define F(X,Y) (X)*(Y)main( ){ int a=3, b=4;printf("%d\n", F(a++, b++));}程序运行后的输出结果是A.12B.15C.16D.20

考题 有以下程序 include main() { int a=1, b=2, c=3, x; x=(a^b)c; pri 有以下程序 #include <stdio.h> main() { int a=1, b=2, c=3, x; x=(a^b)c; printf("%d\n",x); } 程序的运行结果是A.0B.1C.2D.3

考题 请将以下程序中的函数声明语补充完整。 include int【】 main(){int x,y,(*p)(); sccanf(" 请将以下程序中的函数声明语补充完整。include<stdio.h>int【 】main(){ int x,y,(*p)();sccanf("%d%d",x,y);p=max;printf(%d\n",(*p)(x,y));}int max(int a,int b){return(a>b?a:b);}

考题 有以下程序includedefine F(X,Y)(X)*(Y)main(){int a=3,b=4;printf("%d\n",F(a++,b++ 有以下程序 #include<stdio.h> #define F(X,Y)(X)*(Y) main() { int a=3,b=4; printf("%d\n",F(a++,b++)); 程序运行后的输出结果是A.12B.15C.16D.20

考题 以下程序的输出结果是#include "stdio.h"main(){ int a=065; printf("%d\n",--a);}

考题 以下程序运行后的输出结果是( )。 include main() { int x=20; printf("%d", 0 以下程序运行后的输出结果是( )。include<stdio.h>main(){ int x=20;printf("%d", 0<x<20);printf("%d\n", 0<x x<20);}

考题 有以下程序: #include stdio.h main( ) { struct node{int n; struct node*next;} *P; struct node x[3]={{2,x+1),{4,x+2},{6,NULL}}; P= X; printf("%d,",p-n); printf("%d\n",p-next-n); } 程序运行后的输出结果是( )。A.2,3B.2,4C.3,4D.4, 6

考题 下面程序的运行结果是( )。include main(){int a=25; fun(A); }fun(int *x){ print 下面程序的运行结果是( )。include<stdio.h>main(){int a=25;fun(A);}fun(int *x){ printf("%d\n",++*x);}

考题 有以下程序:includedefine X 5+6main(){int a=2,c;C=X*2:printf("%d",C);}程序运行后 有以下程序: #include<stdio.h> #define X 5+6 main() {int a=2,c; C=X*2: printf("%d",C); } 程序运行后的输出结果是( )。A.17B.22C.16D.11

考题 有以下程序 include struct st { int x,y;} data[2]={1,10,2,20}; main( 有以下程序 #include <stdio.h> struct st { int x,y;} data[2]={1,10,2,20}; main() { struct st *p=data; printf("%d,",p->y); printf("%d\n",(++p)->x); } 程序的运行结果是______。A.10,1B.20,1C.10,2D.20,2

考题 有下列程序: include int f(int x) { int y; if(x=0‖x==1)r 有下列程序: #include <stdio.h> int f(int x) { int y; if(x=0‖x==1)return(3); y=x*x-f(x-2); return y; } main() { int z; z=f(3);printf("%d\n",z); 程序的运行结果是( )。A.0B.9C.6D.8

考题 以下程序的输出结果是( )。 include main()fint x=0; sub(x,16,2); printf("%d\n", 以下程序的输出结果是( )。include<stdio.h>main()fint x=0;sub(x,16,2);printf("%d\n",x);}sub(int*a,int n,int k){if(k<=n) sub(a,n/2,2*k);*a+=k;}

考题 有如下程序:includemain(){int x=23; do {Printf("%d",x--);} while(! x);}该程序的执 有如下程序: #include <stdio.h> main() { int x=23; do { Printf("%d",x--);} while(! x); } 该程序的执行结果是( )。A.321B.23C.不输出任何内容D.陷入死循环

考题 有以下程序: include main( ){ int m =12,n=34;printf( "% d% d" ,m++ , ++n);printf( 有以下程序: #include <stdio.h>main( ){ int m =12,n=34; printf( "% d% d" ,m++ , ++n); printf("% d% d \n" ,n ++ , ++m); }程序运行后的输出结果是( )。A.12353514B.12353513C.12343514D.12343513

考题 有以下程序:includemain(){int x=3,y=2,z=1; printf("%d\n",x/y~z);程序运行后的 有以下程序: #include <stdio.h> main() { int x=3,y=2,z=1; printf("%d\n",x/y~z); 程序运行后的输出结果是( )。A.3B.2C.1D.0

考题 有以下程序:include define F(X,Y)(X)*(Y)main(){int a=3,b=4;printf("%d\n",F(a++,b 有以下程序: #include <stdio.h> #define F(X,Y)(X)*(Y) main() { int a=3,b=4; printf("%d\n",F(a++,b++)); } 程序运行后的输出结果是( )。A.12B.15C.16D.20

考题 如下程序的运行结果是______。 include main() { int x=y=3,z=1; printf ("%d%d\n",(++ 如下程序的运行结果是______。 #include<stdio.h> main() { int x=y=3,z=1; printf ("%d%d\n",(++x,y++),z+2); }A.3 4B.4 2C.4 3D.3 3