⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c74_52.htm

📁 经典c语言教程
💻 HTM
字号:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>练习二 </title>
<script language="javascript">

	function init(){
		err=errdiv.style;
		cor=cordiv.style;
	}
	function show(obj){
		obj.display='';
	}
	function hide(obj){
		obj.display='none';
	}

	function ok(p1,p2){
		var i=document.form.T1.value;
		if(i=="I read part of it all the way through."){
			hide(p1);
			show(p2);
		}else{
			hide(p2);
			show(p1);
		}
	}
</script>
</head>

<body bgcolor="#ccefcc" onLoad="init()">

<blockquote>
  <div align="center"><center><table border="6" width="390" cellspacing="0" cellpadding="6"
  height="150" bordercolor="#FF9933">
    <tr>
      <th width="614" bgcolor="#FF9933">程序</th>
    </tr>
    <tr>
      <td ALIGN="center" width="614" bgcolor="#00FFFF"><p align="left">main()<br>
      {<br>
      &nbsp;&nbsp;&nbsp; static char a[30]=&quot;art of it all &quot;;<br>
      &nbsp;&nbsp;&nbsp; static char b[40]=&quot;I read p&quot;;<br>
      &nbsp;&nbsp;&nbsp; char *c=&quot;the way through.&quot;;<br>
      &nbsp;&nbsp;&nbsp; strcat(a,c);<br>
      &nbsp;&nbsp;&nbsp; strcat(b,a);<br>
      &nbsp;&nbsp;&nbsp; puts(b);<br>
      }</td>
    </tr>
  </table>
  </center></div><form name="form">
    <p><font color="#FF0000">提问: </font>程序的输出是什么?<input type="text"
    name="T1" size="34"><input type="button" value="Enter" name="B1" onClick="ok(err,cor)"></p>
  </form>
  <div id="errdiv" style="display:'none'"><p><font color="#FF0000">答案错误!</font> 
  再试一次! </p>
  </div><div id="cordiv" style="display:'none'"><p><font color="#FF0000">答案正确!</font> 
  你知道 strcat() 以两个字符串作为参数, 
  它把第二个串接到第一个串的尾部, 
  并且连结后的串变为新的第一个串。</p>
  </div>
</blockquote>

<p align="center"><a href="javascript:close()">关闭</a></p>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -