MCS-011 Problem Solving and Programming

First year, Semester 1

Chapters

Newsletter

Introduction

As every natural language has a basic character set, computer languages also have a character set, rules to define words. Words are used to form statements. These in turn are used to write the programs.

Computer programs usually work with different types of data and need a way to store the values being used. These values can be numbers or characters. C language has two ways of storing number values—variables and constants—with many options for each. Constants and variables are the fundamental elements of each program. Simply speaking, a program is nothing else than defining them and manipulating them. A variable is a data storage location that has a value that can change during program execution. In contrast, a constant has a fixed value that can’t change.

This unit is concerned with the basic elements used to construct simple C program statements. These elements include the C character set, identifiers and keywords, data types, constants, variables and arrays, declaration and naming conventions of variables


Objectives

After going through this unit, you will be able to:

  • define identifiers, data types and keywords in C;
  • know name the identifiers as per the conventions;
  • describe memory requirements for different types of variables; and
  • define constants, symbolic constants and their use in programs. 

Report an issue

Reporting: Unit-3 Variables and Constants (chapter)

Related Posts