C语言英文版课件课件精品.pptVIP

  • 9
  • 0
  • 约1.38万字
  • 约 36页
  • 2017-02-02 发布于江苏
  • 举报
C语言英文版课件课件精品

Introduction to Computer (C Programming) Software College , Northeastern University 2007,9 3.1 introduction C operators can be classified into a number of categories. They include: Arithmetic operators. Relational operators. Logical operators. Assignment operators. Increment and decrement operators. Conditional operators. Bitwise operators. Special operators. 3.2 Arithmetic operators Operator Meaning + Addition or unary plus - Subtraction or unary minus * Multiplication / Division % Modulo division Example 3.1 The Program shows the use of integer arithmetic to convert a given number of days into months and days. 3.3 Relational Operators C supports six relational operators in all: Operators Meaning is less than = is less than or equal to is greater than = is greater than or equal to == is equal to != is not equal to Relational Operator Complements 3.4 Logical Operators C has the following three logical operators: meaning logical AND || meaning logical OR ! meaning logical NOT Truth Table Op_1 Op_2 Value of the Expression op_1op_2 op_1||op_2 Non_zero Non_zero 1 1 Non_zero 0 1 1 0 Non_zero 1 1 0 0 1 1 3.5 Assignment Operators C has a set of ‘shorthand’ operators of the form: v op =exp; where v is a variable, exp is an expression op is a C binary arithmetic operator

文档评论(0)

1亿VIP精品文档

相关文档