更多“以下程序的输出结果是 #include<stdio.h> s…”相关的问题
第1题
有以下程序: #include <stdio.h> int main() { int d = 1; switch (d) { case 0: printf("%d", d); break; case 1: printf("%d", d); break; case 2: printf("%d", d); break; case 3: printf("%d", d); break; default: break; } printf("\n"); return 0; } 程序运行后的输出结果为( )
点击查看答案
第2题
下面程序的输出结果是() #include <stdio.h> void num() { extern int x,y; int a=15,b=10; x=a-b; y=a+b; } int x,y; main() { int a=7,b=5; x=a-b; y=a+b; num(); printf("%d,%d\n",x,y); }
A、12,2
B、5,25
C、1,12
D、输出不确定
点击查看答案
第3题
有以下程序#include #define P 24;#define S(x) P*x+x;main(){ int a=2, b=2; printf("%d\n",S(a+b));}程序的运行结果是A.程序编译运行时报错,无法输出 B.54 C.96 D.100
点击查看答案
第4题
以下程序的输出结果: #include <stdio.h> struct { int x; int y; }s[2]={1,4,2,5}; void main() { printf("%d\n",s[0].y/s[0].x*s[1].x); }
点击查看答案
第5题
以下程序的输出结果是include "stdio.h"int *f(int *x,int *y){ if(*x<*y) return x; else return y;}main(){ int a=7,b=8, *p,*q,*r ; p=&a; q=&b; r= f(p,q); printf("%d,%d,%d\n",*p,*q,*r);}
点击查看答案
第6题
下列程序的运行结果是( ) #include <stdio.h> void fun(int x); int main() { fun(7); printf(""); return 0; } void fun(int x) { if(x/2>1) fun(x/2); printf("%2d",x); }
点击查看答案
第7题
以下程序的运行结果是: #include <stdio.h> int a=3, b=5; int max(int a, int b) { int c; c=a>b?a:b; return c; } int main() { int a=8; printf("%d\n", max(a, b)); return 0; }
点击查看答案
第8题
有以下程序: #include <stdio.h> int fun (int a,int b,int c) { c=a *b; } main() { int c; fun(2,3,c); printf(“%d\n”.c); } 程序的输出结果是_______.
点击查看答案