以下程序输出结果是___________.#include [stdio.h]#include [string.h]int main() { int a=2,*pa=&a; float n=5.888,b,*pn=&n; b=*pa+(int)*pn;printf("%.1f\n",b); return 0;}
7.0
举一反三
- 以下程序输出结果是( ).#include [stdio.h]int main() { int a=2,*pa=&a; float n=5.888,b,*pn=&n; b=*pa+(int)*pn; printf("%.1f\n",b); return 0;} A: 8 B: 7 C: 8.0 D: 7.0
- 以下程序输出结果是( ).#include <stdio.h>int main() { int a=2,*pa=&a; float n=5.888,b,*pn=&n; b=*pa+(int)*pn; printf("%.1f ",b); return 0;} A: 8 B: 7 C: 8.0 D: 7.0
- #include [stdio.h] int main() { int a=1; int *pa; pa=&a; printf("a=%d\n",a); printf("*pa=%d\n",*pa); *pa=2; printf("a=%d\n",a); return 0; }的运行结果()
- #include [stdio.h] int main() { int a=1; int *pa; pa=&a; *pa=3; printf("a=%d\n",a); return 0; }
- 下列程序的运行结果是?#include [stdio.h] int f(int n); int main() { printf("%d\n", f(f(f(f(1))))); return 0; } int f(int n) { return n + 1; } A: 5 B: 4 C: 3 D: 2
内容
- 0
以下程序的输出结果是______。#include [stdio.h]int f(int a[ ],int n){ if(n>1)return a[0]+f(&a[1],n-1);else return a[0];}int main(){ int aa[3]={1,2,3},s;s=f(&aa[0],3);printf(“%d\n”,s);return 0; }
- 1
以下程序的运行结果是( )。#include [stdio.h]int f(int m, int n){ return m > n ? m : n;}main(){ int x = f(5, 3); printf("%d\n", x);}
- 2
以下程序的输出结果是______ 。#include int f(int n) { if(n == 1) return 1; else return n + f(n - 1);}int main(void) { printf("%d\n", f(5)); return 0;}
- 3
以下程序输出的结果是__________.#include [stdio.h]int main(){ int x=30,y=7; y=(-x+3)%y-2; printf("%d\n",y); return 0;}
- 4
以下程序输出的结果是____________.#include [stdio.h]int main(){ int x=30,y=7; x=y=x%y; printf("%d\n",x); return 0;}