要求以下程序的功能是计算:s=1+1/2+1/3+……+1/10#include void main(){ int n; float s;s=1.0;for(n=10;n>1;n--)s=s+1/n;printf(%6.4f\n,s);}程序运行后输出结果错误,导致错误结果的程序行是( )。
有以下程序,程序运行后的输出结果是 _________ 。 #include void main( ) { int f,f1,f2,i; f1=0;f2=1; printf(%d %d,f1,f2); for(i=3;i<=5;i++) { f=f1+f2;printf(%d,f); f1=f2;f2=f; } printf(\n); }
有以下程序,程序的运行结果是 _________ 。 #include void main() { char ch='Z'; ch=(ch-'A'+1)%26+'A'; putchar(ch); }
有以下程序: #include struct S { int a,b; } data[2]={10,100,20,200}; void main() {struct S p; p=data[1]; printf(%d\n,++(p.a)); } 程序的运行结果是( )
有以下程序#include void main(){charstr[]={Hello,Beijing};printf(%d,%d\n,strlen(str),sizeof(str));}程序的运行结果是( )
以下程序的运行结果是____________#include stdio.hvoid main(){void increment();increment();increment();increment();}void increment(){int x=0;x+=1;printf(%d ,x);}
以下程序运行后的输出结果是#include“stdio.h”void main(){ char c;c='B'+32;printf(%c\n,m);}
有以下程序: #include void main() { char a[][10] = {'Morning', 'Afternoon', 'Evening', 'Night'}; printf('%s',a[1]); } 程序运行后的输出结果是__________。
以下程序的运行结果为_____。 #include #define f(x) x*x void main() { int a = 6, b = 2, c; c = f(a)/f(b); printf('%d', c); }
下程序运行结果________ #include #include struct A {int a; char b[10]; double c; }; void f (struct A *t); main() {struct A a={1001,”ZhangDa”,1098.0}; f(&a); printf(“%d,%s,%6,if”,a.a,a.b,a.c); } void f(struct A *t) { strcpy(t->b, ”ChangRong”); }
有以下程序: #include void f ( int b[ ] ) { int i; for( i=2;i<6;i++) b[i]*=2; } int main( ) { int a[10]={1,2,3,4,5,6,7,8,9,10},i; f( a ); for( i=0;i<10;i++ ) printf(\%d,\,a[i]); return 0; } 运行结果是
以下程序程序运行后的输出结果是_____。#include#define MA(x) x*(x-1)void main(){ int a = 1, b = 2;printf('%d ', MA(1+a+b));}
有以下程序: include <stdio.h> void f(); } 执行后的输出结果【 】。
有以下程序 include <stdio.h> void fun(char **p) { ++p; printf("%s\n",*p); } main() { char *a[]={"Moming","Afternoon","Evening","Night"}; fun(a); } 程序的运行结果是
以下程序的运行结果是 _____________ include "stdio.h" void main()x=%d y=%d z=%d
以下程序的正确运行结果是()。include<iostream.h>int f(int);void main(){int a=2,i;for(i=0;i<
阅读以下程序,写出程序运行后的输出结果是 ______。include<iostream.h>void main(){char a[]={'
有以下程序 include <stdio.h> void main() { int i; for(i=0;i<3;i++) { switch(i) case 1: printf("%3d",i); 2: default: } 程序运行后的输出结果是()>
有以下程序 include <stdio.h> void main() { int y=9; for(;y>0;y--) { if(y%3==0) { printf("%3d",--y); continue; } } } 程序运行后的输出结果是()
若运行时给变量x输入12,则以下程序的运行结果是include <iostream.h>void main(){ int x,y; cin
有以下程序 include<stdio.h>include<string.h>void fun(); } 程序运行后的输出结果是
有以下程序 include<stdio.h>include<string.h>typedef struct stu { char name[10]; char gender; int score; } STU; void f(); } 程序的运行结果是
3.以下程序运行结果是: include <stdio.h> void main() { int x=3,y=2,z=1; printf("%d ",x/y&~z); }
以下程序若运行时输入ABC,则输出结果是______。 include include void main(); }
下列程序输出的结果是()。include void f(int * x ){ *x = 10 ;