MCS-011 Problem Solving and Programming

First year, Semester 1

Chapters

Newsletter

Introduction

In the previous unit we have learnt variables, constants, datatypes and how to declare them in C programming. The next step is to use those variables in expressions. For writing an expression we need operators along with variables. An expression is a sequence of operators and operands that does one or a combination of the following:

  • specifies the computation of a value
  • designates an object or function
  • generates side effects.

An operator performs an operation (evaluation) on one or more operands. An operand is a subexpression on which an operator acts.

This unit focuses on different types of operators available in C including the syntax and use of each operator and how they are used in C.

A computer is different from calculator in a sense that it can solve logical expressions also. Therefore, apart from arithmetic operators, C also contains logical operators. Hence, logical expressions are also discussed in this unit.  


Objecticves

After going through this unit you will be able to:

  • write and evaluate arithmetic expressions;
  • express and evaluate relational expressions;
  • write and evaluate logical expressions;
  • write and solve compute complex expressions (containing arithmetic, relational and logical operators), and
  • check simple conditions using conditional operators. 

Report an issue

Reporting: Unit-4 Expressions and Operators (chapter)

Related Posts