∆S = ∆H/T适合于下列过程中的哪一个?
A.恒压过程
B.绝热过程
C.恒温过程
D.可逆相变过程
A.恒压过程
B.绝热过程
C.恒温过程
D.可逆相变过程
第1题
第2题
第3题
请改正程序中的错误,使它能得出正确的结果。
注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。
试题程序:
include <conio.h>
include <stdio.h>
include <string.h>
void fun (char *s, char *t )
{
int i,sl;
sl=strlen(s);
for (i=0;i<sl;i++)
t[i]=s[sl-1];
for (i=0; i<sl; i++)
/*************found**************
t [sl+i]=s [i];
t [2*sl]-'\0';
}
main ( )
{ char s[100], t[100];
clrscr();
printf("\nPlease enter string s: ");
scanf ("%s", s);
fun (s,t);
printf ("The result is: %s\n",t);
}
第4题
请改正程序中的错误,使它能得到正确结果。
注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。
试题程序:
include<stdio.h>
include<conio.h>
/************found*************/
int fun(long S,long *t)
{
long s1=l0;
*tiS%10;
while(s>0)
{
/*************found*************/
s=s%100;
*t=S%10*S1+*t;
s1=s1*10;
}
}
main()
{
long S,t;
clrscr();
printf("\nPIease enter S:");
scanf(“%ld”,&s);
fun(S,&t);
printf(“The result is:%ld\n”,t);
}
第5题
请改正程序中的错误,使它能得出正确的结果。
注意:不要改动main函数,不得增行或删行,也不得更改程序的结构.
试题程序:
include <conio.h>
include <stdio.h>
include <string.h>
int fun (char *s, char *t)
{int n; char *p, *r;
n=0;
while(*s)
{p=s;
r=t;
while (*r)
/**************found**************/
if(*r==*p) {r++; p++}
else break;
/*************found**************/
if(r=='\0')
n++;
s++;
}
return n;
}
main()
{char s[100], t[100]; int m;
clrscr();
printf("\nPlease enter string s: ");
scanf ("%s",s);
printf("\nPlease enter substring t: ");
scanf ("%s",t);
m=fun (s,t);
printf("\nThe result is: m=%d\n", m);
}
第6题
例如,当s中的数为7654321时,t中的数为7531。请改正程序中的错误,使它能得出正确的结果。
注意:部分源程序在文件MODll.C中,不得增行或删行,也不得更改程序的结构!
include<;stdi0.h>;
第7题
请改正程序中的错误,使它能得出正确的结果。
注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。
试题程序:
include <conio.h>
include <stdio.h>
include <string.h>
/*************found**************/
int fun (char *s, char *t1, char *t2, char *w)
{
int i; char *p,*r,*a;
strcpy(w,s);
while (*w)
{p=w; r=t1;
/*************found**************/
while (r)
if (*r= =*p) {r++;p++;}
else break;
if (*r= ='\0')
{a=w; r=t2;
/*************found**************/
while (*r){*a=*r;a++;r++}
w+=strlen(t2);
}
else w++;
}
}
main()
{char s[100],t1[100],t2[100],w[100];
clrscr();
printf("\nPlease enter string S: ");
scanf("%s",s);
printf("\nPleaseentersubstring t1: ");
scanf ("%s", t1);
printf("\nPlease enter substring t2: ");
scanf ("%s",t2);
if (strlen(t1)= =strlen(t2))
{
fun (s,t1,t2,w);
printf("\nThe result is : %s\n",w);
}
else printf("Error : strlen(t2)\n");
}
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!