0% found this document useful (0 votes)
36 views33 pages

C Programming Lecture 1

C is a programming language developed in 1972 by Dennis Ritchie at Bell Labs to develop the UNIX operating system. It was created to overcome limitations of the B programming language by adding data types and structures. C is a high-level language that allows for faster development of code compared to assembly language. Constant values cannot change, variables may change, and keywords carry special meaning in C programs.

Uploaded by

shubh mehta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views33 pages

C Programming Lecture 1

C is a programming language developed in 1972 by Dennis Ritchie at Bell Labs to develop the UNIX operating system. It was created to overcome limitations of the B programming language by adding data types and structures. C is a high-level language that allows for faster development of code compared to assembly language. Constant values cannot change, variables may change, and keywords carry special meaning in C programs.

Uploaded by

shubh mehta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 33

C Programming

Dr. Vikas Khare


Associate Professor
STME, NMIMS, Indore
Certified Energy Manager
Under The Bureau of Energy Efficiency, India
Introduction
C is a programming language developed at AT & T’S Bell laboratory of
USA in 1972. it was designed and written by a man named Dennis Ritchie.
As C is a case sensitive language, all keywords must be written in
lowercase.
The objective of its development was in the context of the re-design of the
UNIX operating system to enable it to be used on multiple computers.
Earlier the language B was now used for improving the UNIX system.
Being a high level language, B allowed much faster production of code than
in assembly language.
Still, B suffered from drawbacks as it did not understand data-types and did
not provide the use of “structures”.
To overcome the drawbacks Dennis Ritchie develop a new programming
language called C.
He kept most of language B’s syntax and added data-types and many other
required changes.
Introduction
Constant, Variable, Keywords
A constant is an entity that doesn’t change
A variable is an entity that may change
A keywords is a word that carries special meaning
C Constant
Integer Constant
At least have one digit
Not have a decimal point
It can either ‘-’ or ‘+’
Allowable range for integer constant is
-2147483648 to + 2147483647
For compiler like Visual Studio, it is
-2147483648 to + 2147483647
In Turbo C and Turbo C++ “-32768 to +32767”
Real Constant
All the rules for real constant is just same of integer
constant and but it also carry “decimal point”

CHARACTER: It is a single alphabet.


Rules for constructing variable names
The first character in the variable name must be an
alphabet or underscore (_).
 No commas or blanks are allowed with in a variable
name.
 No special symbol other than underscore (_) can be
used in variable name.
What is Programming
Computer programming is the process of building and designing
an executable computer program for accomplishing a specific
computing task. Programming involves tasks such as analysis,
generating algorithms, profiling algorithms' accuracy and resource
consumption, and the implementation of algorithms in a chosen
programming language (commonly referred to as coding). The
source code of a program is written in one or more programming
languages. The purpose of programming is to find a sequence of
instructions that will automate the performance of a task for
solving a given problem. The process of programming thus often
requires expertise in several different subjects, including
knowledge of the application domain, specialized algorithms, and
formal logic.
Example :
TURBO C
Turbo C is a discontinued Integrated Development
Environment and compiler for the C programming
language from Borland. First introduced in 1987, it was
noted for its integrated development environment, small
size, fast compile speed, comprehensive manuals and low
price.
What is the difference between runtime
and compile time
Runtime and compile time are programming terms that refer to different stages
of software program development. In order to create a program, a developer
first writes source code, which defines how the program will function. Small
programs may only contain a few hundred lines of source code, while large
programs may contain hundreds of thousands of lines of source code. The
source code must be compiled into machine code in order to become and
executable program. This compilation process is referred to as compile time.
A compiled program can be opened and run by a user. When an application is
running, it is called runtime.
The terms "runtime" and "compile time" are often used by programmers to
refer to different types of errors. A compile time error is a problem such as a
syntax error or missing file reference that prevents the program from
successfully compiling. The compiler produces compile time errors and usually
indicates what line of the source code is causing the problem.
Debugging
Debugging is the routine process of locating and removing
computer program bugs, errors or abnormalities, which is
methodically handled by software programmers via
debugging tools. Debugging checks, detects and corrects
errors or bugs to allow proper program operation
according to set specifications.

You might also like