0% found this document useful (0 votes)
8 views

C Programming

Uploaded by

ROSIL ROSALINDA
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

C Programming

Uploaded by

ROSIL ROSALINDA
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

Introduction to Language &

Expressions

Development of
C Language
What is C?
 C is a compiler based
programming language
supports both high level
and low level statements to
interact directly with the
hardware.
Development of C Language
• The C programming language evolved
from a succession of programming
languages developed at Bell
Laboratories in early 1970s. It was not
until the late 1970s that this
programming language began to gain
widespread popularity and support.
Features of C
Simple, versatile, general purpose language
• Programs are fast and efficient
• Has got rich set of operators
• more general and has no restrictions
• can easily manipulates with bits, bytes
and addresses.
• Varieties of data types are available.
Features of C
• separate compilation of functions is
possible and such functions can be
called by any C program
• block-structured language
• Can be applied in System programming
areas like operating systems, compilers
& Interpreters, Assemblers etc.,
Programming Basics
Components of a program
1. Constants
2. Variables
3. Operators
4. statements
Constants
A constant is a fixed value, which never altered
during the execution of a program.
Constants can be divided into two major
categories:

1. Primary Constants
2. Secondary Constants
Data Types
The kind of data that the used variables can hold
in a programming language is known as the data
type.
Basic data types are as follows:
1. Numeric Data Type
2. Non-Numeric Data Type
3. Integer Data Type
4. Real Data Type
5. Logical Data Type
6. Enumerated Data Type
1. Numeric Data Type: Totally deals
with the numbers. These numbers
can be of integer (int) data type or
real (float) data type.
2. Non-Numeric Data Type : Totally
deals with characters. Any
character or group of characters
enclosed within quotes will be
considered as
non-numeric or character data type.
3. Integer Data Type : Deals with integers
or whole numbers. All arithmetic
operations can be achieved through this
data type and the results are again
integers.
4. Real Data Type : deals with real
numbers or the numeric data, which
includes fractions. All arithmetic
operations can be achieved through this
data type and the results can be real data
type.
5. Logical or Boolean Data Type : can hold
only either of the two values TRUE or
FALSE at a time. In computer, a 1 (one) is
stored for TRUE and a
0 (zero) is stored for FALSE.
6. Enumerated Data Type : Includes the
unstructured data grouped together to
lead to a new type. This data type is not
standard and us usually defined
by user.
5. Logical or Boolean Data Type : can hold
only either of the two values TRUE or
FALSE at a time. In computer, a 1 (one) is
stored for TRUE and a
0 (zero) is stored for FALSE.
6. Enumerated Data Type : Includes the
unstructured data grouped together to
lead to a new type. This data type is not
standard and us usually defined
by user.
Example Programs:C Example Program:

\* 0001_hello.c *\
#include <stdio.h>
int main()
{
printf("\nHello world");
return 0;
}
Let’s start the Workshop!

You might also like