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

📄 right1-4.htm

📁 Visual C++面向对象程序设计教程(配套习题资源)
💻 HTM
字号:
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>第 1 章</title>
<base target="rbottom">
<style>
<!--
.右标题   { font-size: 10pt; color: #000080; text-indent: 0; margin: 0 }
.右内容   { font-size: 10pt; text-align: left; text-indent: 0; line-height: 100%; margin: 
               0 }
-->
</style>
</head>

<body>

<p style="line-height: 100%; margin-top: 0; margin-bottom: 0"> </p>
<p style="line-height: 100%; margin-top: 0; margin-bottom: 0"><span style="position: absolute; left: 7; top: -9"><img border="0" src="1.gif" width="63" height="70"></span></p>
<p style="line-height: 100%; margin-top: 0; margin-bottom: 0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p style="line-height: 100%; text-indent: 0; margin: 0" class="右标题" align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            
&nbsp;&nbsp;&nbsp; <span style="background-color: #CCFF99">第 1 章</span><span style="background-color: #CCFF99">&nbsp;            
</span>&gt;<span style="background-color: #CCFF99"> 第 1 节 </span>&gt;<span style="background-color: #CCFF99"> 
1.4 运算符、表达式与语句</span></p>    
<hr color="#008000" size="1">

  <p ALIGN="left" style="line-height: 150%; margin: 0"><font FACE="oúì?,SimHei" LANG="ZH-CN" size="2">1.    
  运算符</font></p>
  <p ALIGN="left" style="line-height: 150%; margin: 0"><font size="2">C++<font FACE="??ì?,SimSun" LANG="ZH-CN">中运算符分为算术运算符、关系运算符、逻辑运算符、条件运算符、逗号运算符、位运算符、指针运算符等。学习运算符时要掌握每种运算符的功能、优先级和结合性以及在使用中应注意的事项。</font></font></p>
  <p ALIGN="left" style="line-height: 150%; margin: 0"><font FACE="oúì?,SimHei" LANG="ZH-CN" size="2"><i>优先级和结合性</i></font></p>
  <p ALIGN="left" style="line-height: 150%; margin: 0"><font size="2">(1)<font FACE="??ì?,SimSun" LANG="ZH-CN"> 
  优先级</font></font></p>   
  <font SIZE="3">
  <p ALIGN="left" style="line-height: 150%; margin: 0"></font><font FACE="??ì?,SimSun" LANG="ZH-CN" size="2">每种运算符都有一个优先级,优先级是用来标志运算符在表达式中的运算顺序的。优先级高的先做运算,优先级低的后做运算,优先级相同的由结合性决定计算顺序。</font></p>
  <p ALIGN="left" style="line-height: 150%; margin: 0"><font size="2">(2)     
  <font FACE="??ì?,SimSun" LANG="ZH-CN">结合性</font></font></p>
  <font SIZE="3">
  <p style="line-height: 150%; margin: 0" ALIGN="left"></font><font FACE="??ì?,SimSun" LANG="ZH-CN" size="2">大多数运算符都是按从左到右计算,只有三类运算符的结合性是从右到左,它们是:单目运算符、三目运算符和赋值运算符。这一点一定要记住。</font></p>
  <p ALIGN="left" style="line-height: 150%; margin: 0"><font size="2">C++<font FACE="??ì?,SimSun" LANG="ZH-CN">运算符的优先级和结合性见<a href="table1-4.htm" target="_blank">表</a></font><a href="table1-4.htm" target="_blank">1-4</a><font FACE="??ì?,SimSun" LANG="ZH-CN">。</font></font></p>
  <p ALIGN="left" style="line-height: 150%; margin: 0"><font face="oúì?,SimHei" lang="ZH-CN" size="2">2.    
  表达式</font></p>
  <font SIZE="3">
  <p ALIGN="left" style="line-height: 150%; margin: 0"></font><font FACE="??ì?,SimSun" LANG="ZH-CN" size="2">将常量或变量用运算符连接起来的式子称为表达式。例如:</font><font size="2">a+b-3</font></p>
  <font SIZE="3">
  <p ALIGN="left" style="line-height: 150%; margin: 0"></font><font FACE="??ì?,SimSun" LANG="ZH-CN" size="2">每一个表达式都有一个确定的值,表达式求值的顺序和表达式中运算符的优先级和结合性相关。</font></p>
  <p ALIGN="left" style="line-height: 150%; margin: 0"><font size="2">3.     
  </font><font FACE="??ì?,SimSun" LANG="ZH-CN"><font size="2">语句</font></p>
  </font>
  <p ALIGN="left" style="line-height: 150%; margin: 0"><font size="2">C++<font FACE="??ì?,SimSun" LANG="ZH-CN">规定表达式后加分号构成</font>C++<font FACE="??ì?,SimSun" LANG="ZH-CN">的语句,也就是一条语句结束的标志是分号。例如:x=2;</font></font></p>
  <p ALIGN="left" style="line-height: 100%; margin: 0"><font size="2">C++<font FACE="??ì?,SimSun" LANG="ZH-CN">的语句详细情况见<a href="table1-5.htm" target="_blank">表</a></font><a href="table1-5.htm" target="_blank">1-5</a><font FACE="??ì?,SimSun" LANG="ZH-CN">。</font></font></p>

<hr size="1" color="#008000">
<p style="line-height: 100%; margin-top: 0; margin-bottom: 0"><span style="position: absolute; left: 34; top: 495"><a href="right1-3.htm" target="_self"><img border="0" src="rightd1.gif" width="113" height="70"></a></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
<span style="position: absolute; left: 497; top: 496"><a href="right1-5.htm" target="_self"><img border="0" src="rightd2.gif" width="124" height="63"></a></span></p>

</body>

</html>

⌨️ 快捷键说明

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