SlideShare a Scribd company logo
1 of 33
Course: BCA
Subject: Programming In C Language
Unit-1
Introduction to C language
Function OF Computer
 Input -- Input devices enable us to get information into a computer. Some
examples include a keyboard, mouse, microphone, scanner, or digital camera.
 Storage -- There are two types of storage: temporary and long-term.
RAM, or random access memory, is temporary, meaning it stores information as
you use it, but it is being constantly erased and rewritten as you open and close
files.
Long-term storage holds information for as long as you want it. Hard drives,
portable hard drives, floppy drives, flash drives, CD’s, and DVD’s are long term
storage devices.
 Processor -- A microprocessor controls the computers’ functions. It is smaller
than a dime, but contains millions of transistors that perform millions of
instructions per second. The microprocessor performs these instructions using a
three-step process: fetch, decode and execute.
 Output -- Information that has been processed is communicated back to the
user in the form of words, sounds or pictures, and is delivered through printers,
speakers, monitors or other output devices. Sometimes output is just written
back to a storage dev
Basic Building Block Of Computer
Control Unit-
this is the device or a part of computer responsible or
performs such regulating functions..
Arithmetic Logic Unit- this is the part or a circuitry of
the Microprocessor chip for arithmetic operations,
proportional and related functions, and logical
functions.
Memory- this is a part of computer or a card or modules
that inserted to the motherboard’s slot
Input -The System Unit that the system of computer
feeds or decode first the data before to display using the
output devices of computer.
Output Devices- this is refer to the devices of
computer that have an ability to display the information
or can produce a hardcopy of a document.
Computer Applications
Classification Of Computer
Classification Of Programming Language
What is UNIX?
 UNIX is an operating system which was first developed in
the 1960s, and has been under constant development ever
since. By operating system, we mean the suite of programs
which make the computer work. It is a stable, multi-user,
multi-tasking system for servers, desktops and laptops.
 UNIX systems also have a graphical user interface (GUI)
similar to Microsoft Windows which provides an easy to
use environment.
 However, knowledge of UNIX is required for operations
which aren't covered by a graphical program, or for when
there is no windows interface available, for example, in a
telnet session.
Cont..
 There are many different versions of UNIX, although
they share common similarities. The most popular
varieties of UNIX are Sun Solaris, GNU/Linux, and
MacOS X.
What is LINUX?
 It is the software on a computer that enables applications
and the computer operator to access the devices on the
computer to perform desired functions.
 Linux is developed collaboratively, meaning no one
company is solely responsible for its development or
ongoing support. Companies participating in the Linux
economy share research and development costs with
their partners and competitors
Windows
 The operating system gives the framework upon which all
other services and applications run. The majority of home
users use a Windows based machine. Most of today’s
applications and games are designed to run solely on
Microsoft systems.
 Microsoft Windows is extremely popular in schools and
colleges, many businesses also use Windows.
 The oldest of all Microsoft’s operating systems is MS-DOS
(Microsoft Disk Operating System). MS-DOS is a text-based
operating system. Users have to type commands rather than
use the more friendly graphical user interfaces
(GUI’s)available today
What is algorithm?
 A method that can be used by a computer for the solution
of a problem.
 A sequence of computational steps that transform the
input into the output.
 The word ”algorithm” comes from the name of a Persian
author, Abu Ja’far Mohammed ibn Musa al Khowarizmi (c.
825 A.D.), who wrote a textbook on mathematics.
 An algorithm (pronounced AL-go-rith-um) is a procedure
or formula for solving a problem.
Algorithm
Write an algorithm and draw the flowchart for finding
the average of two numbers Algorithm:
 Input: two numbers x and y
 Output: the average of x and y
 Steps:
 input x
 input y
 sum = x + y
 average = sum /2
 output average
Introduction to flowcharts
 A flowchart is a graphical representation of an algorithm.

• Start or end of the program

• Computational steps or processing function of a program


• Input or output operation


• Decision making and branching


• Connector or joining of two parts of program
Introduction of ‘C’
 Root of the morden language is ALGOL 1960. It’s first computer
language to use a block structure.
 It gave concept of structured programming.
 In 1967, Martin Richards developed a language, BCPL (Basic
Combined Programming Language)
 In 1970,by Ken Thompson created a language called as ‘B’.
It used to create early version of Unix.
 In 1972,by Dennis Ritchie introduced new language called as ‘C’ .
1972 Traditional C Dennis Ritchie
1990 ANSI/ISO C ISO Committee
1978 K&R C Kernighan &Ritchie
1989 ANSI C ANSI Committee
Features Of C
 It is robust lang whose rich setup of built in functions and operator can be used to write any
complex prog
 Prog written in c are efficient due to severals variety of data types and powerful operators.
 The c complier combines the capabilities of an assembly lang with the feature of high level
language. Therefore it is well suited for writing both system software and business package.
 There r only 32 keywords, severals standard functions r available which can be used for
developing prog.
 c is portable lang , this means that c programes written for one computer system can be run on
another system, with little or no modification.
 c lang is well suited for stuctured programming, this requires user to think of a problems in
terms of function or modules or block. A collection of these modules make a program
debugging and testing easier.
 c language has its ability to extend itself. A c program is basically a collection of functions that are
supported by the c library. We can contuniously add our own functions to the library with the
avaibility of the large number of functions.
 In india and abroad mostly people use c programming lang becoz it is easy to learn and
understand
Basic structure of C programming
 To write a C program, we first create functions and then put them together. A C program may contain one
or more sections. They are illustrated below.

 Documentation section
 Link section
 Definition section
 Global declaration section
 main () Function section
 {
 Declaration part
 Executable part


 }
 Subprogram section
 Function 1
 Function 2
 …………..
 …………..
 Function n (User defined functions)
Basic structure of ‘C’
Documentation Section
It has set of comment lines(name of program, author details).
What is Comment line??
 To guide a programmer to write a note for function,operation,logic in
between a program.
 Non-executable statement.
 Can’t be nested.
e.g:- /* Hello /* abc */ Hi */
ERROR.
Link Section
It provides instructions to the compiler to link function from
the system library.
# include Directive:-
 To access the functions which are stored in the library, it is
necessary to tell the compiler , about the file to be accessed.
Syntax:-
#include<stdio.h>
 stdio.h is header file.
Definition Section
 defines all symbolic constants.
 #define instruction defines value to a symbolic constant.
 #define:-
 It is a preprocessor compiler directive, not a statement.
 Therefore it should not end with a semicolon.
 Generally written in uppercase.
Global Declaration Section
 Some variables that are used in more than on function,
such variables (global variables) declared in the global
declaration section.
 It also declares all the user-defined function.
 Every ‘C’ program must have one main() function section.
 It contains two parts
1) Declaration part:
 It declares all variables used in the executable part.
2) Executable part:
 It has atleast one statement.
Main() function section
A simple C program: Printing a line of text
#include <stdio.h>
main()
{
printf(“hello, worldn”);
}
Program output:
hello, world
Executing a C program :
Executing a C program involves a series of steps.
They are,
 Creating the program.
 Compiling the program.
 Linking the program with functions that are needed
from the C library.
 Executing the program.
How to run a program?
 There are two ways to run programs written in a high-level
language.
 The most common is to Compile the program
 The other method is to pass the program through an interpreter.
Compiler
Why compiler is require ?
As machine (a processor) can operate On binary code instruction
only…..If we use higher level language then …For execution of the
program we must Convert it to lower level / machine level
Code.
Means,
A program that translates Source code into object code.
The compiler derives its name from the way it works, looking
at the entire piece of source code and collecting and
reorganizing the instructions.
Interpreter:
which analyzes and executes each line of source code
without looking at the entire program.
Advantage of interpreter:
It can execute a program immediately.
Compilers require some time before an executable program
emerges.
But,
However, programs produced by compilers Run much faster
than the same programs executed by an interpreter.
Compiler
checks for syntax errors if any on success coverts ‘C source
code into object code form which is nearer to machine…
process of compiling and running a C program
References:
1. Programming in C by yashwant kanitkar
2. ANSI C by E.balagurusamy- TMG publication
3. Computer programming and Utilization by sanjay shah Mahajan Publication
4. .www.cprogramming.com/books.html
5. en.wikipedia.org/wiki/C_(programming_language)
6. www.programmingsimplified.com/c-program-example
7. http://cm.bell-labs.com/cm/cs/who/dmr/chist.html
8. http://en.wikipedia.org/wiki/Comparison_of_programming_languages
9. http://en.wikipedia.org/wiki/List_of_C-based_programming_languages
10. http://en.wikipedia.org/wiki/C_(programming_language)

More Related Content

What's hot

History of C Programming Language
History of C Programming LanguageHistory of C Programming Language
History of C Programming LanguageNiloy Biswas
 
Assembly level language
Assembly level languageAssembly level language
Assembly level languagePDFSHARE
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programmingTejaswiB4
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointJavaTpoint.Com
 
constants, variables and datatypes in C
constants, variables and datatypes in Cconstants, variables and datatypes in C
constants, variables and datatypes in CSahithi Naraparaju
 
Storage Class in C Progrmming
Storage Class in C Progrmming Storage Class in C Progrmming
Storage Class in C Progrmming Kamal Acharya
 
How to execute a C program
How to execute a C  program How to execute a C  program
How to execute a C program Leela Koneru
 
Memory allocation in c
Memory allocation in cMemory allocation in c
Memory allocation in cPrabhu Govind
 
Operator in c programming
Operator in c programmingOperator in c programming
Operator in c programmingManoj Tyagi
 
Computer architecture register transfer languages rtl
Computer architecture register transfer languages rtlComputer architecture register transfer languages rtl
Computer architecture register transfer languages rtlMazin Alwaaly
 
1. over view and history of c
1. over view and history of c1. over view and history of c
1. over view and history of cHarish Kumawat
 

What's hot (20)

C basics
C   basicsC   basics
C basics
 
The Phases of a Compiler
The Phases of a CompilerThe Phases of a Compiler
The Phases of a Compiler
 
History of C Programming Language
History of C Programming LanguageHistory of C Programming Language
History of C Programming Language
 
Assembly level language
Assembly level languageAssembly level language
Assembly level language
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programming
 
Linker and Loader
Linker and Loader Linker and Loader
Linker and Loader
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpoint
 
constants, variables and datatypes in C
constants, variables and datatypes in Cconstants, variables and datatypes in C
constants, variables and datatypes in C
 
Introduction to problem solving in C
Introduction to problem solving in CIntroduction to problem solving in C
Introduction to problem solving in C
 
c-programming
c-programmingc-programming
c-programming
 
Features of c
Features of cFeatures of c
Features of c
 
Storage Class in C Progrmming
Storage Class in C Progrmming Storage Class in C Progrmming
Storage Class in C Progrmming
 
How to execute a C program
How to execute a C  program How to execute a C  program
How to execute a C program
 
Function C programming
Function C programmingFunction C programming
Function C programming
 
Memory allocation in c
Memory allocation in cMemory allocation in c
Memory allocation in c
 
Assembly language
Assembly languageAssembly language
Assembly language
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Operator in c programming
Operator in c programmingOperator in c programming
Operator in c programming
 
Computer architecture register transfer languages rtl
Computer architecture register transfer languages rtlComputer architecture register transfer languages rtl
Computer architecture register transfer languages rtl
 
1. over view and history of c
1. over view and history of c1. over view and history of c
1. over view and history of c
 

Viewers also liked

handling input output and control statements
 handling input output and control statements handling input output and control statements
handling input output and control statementsRai University
 
C++ history session 00 history
C++ history session 00   historyC++ history session 00   history
C++ history session 00 historyArun Prakash
 
Inline assembly language programs in c
Inline assembly language programs in cInline assembly language programs in c
Inline assembly language programs in cTech_MX
 
Lecture 2 history_of_c
Lecture 2 history_of_cLecture 2 history_of_c
Lecture 2 history_of_ceShikshak
 
operators and control statements in c language
operators and control statements in c languageoperators and control statements in c language
operators and control statements in c languageshhanks
 
File in C programming
File in C programmingFile in C programming
File in C programmingSamsil Arefin
 
List of programs for practical file
List of programs for practical fileList of programs for practical file
List of programs for practical fileswatisinghal
 
C language first program
C language first programC language first program
C language first programNIKHIL KRISHNA
 
C Language Program
C Language ProgramC Language Program
C Language ProgramWarawut
 
Introduction to c_language
Introduction to c_languageIntroduction to c_language
Introduction to c_languageWay2itech
 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01Wingston
 
C program report tips
C program report tipsC program report tips
C program report tipsHarry Pott
 
A brief introduction to C Language
A brief introduction to C LanguageA brief introduction to C Language
A brief introduction to C LanguageMohamed Elsayed
 

Viewers also liked (20)

handling input output and control statements
 handling input output and control statements handling input output and control statements
handling input output and control statements
 
C++ history session 00 history
C++ history session 00   historyC++ history session 00   history
C++ history session 00 history
 
Inline assembly language programs in c
Inline assembly language programs in cInline assembly language programs in c
Inline assembly language programs in c
 
Lecture 2 history_of_c
Lecture 2 history_of_cLecture 2 history_of_c
Lecture 2 history_of_c
 
operators and control statements in c language
operators and control statements in c languageoperators and control statements in c language
operators and control statements in c language
 
File in C programming
File in C programmingFile in C programming
File in C programming
 
List of programs for practical file
List of programs for practical fileList of programs for practical file
List of programs for practical file
 
C language first program
C language first programC language first program
C language first program
 
History of programming
History of programmingHistory of programming
History of programming
 
C Language Program
C Language ProgramC Language Program
C Language Program
 
What is c
What is cWhat is c
What is c
 
C PROGRAMMING BASICS- COMPUTER PROGRAMMING UNIT II
C PROGRAMMING BASICS- COMPUTER PROGRAMMING UNIT IIC PROGRAMMING BASICS- COMPUTER PROGRAMMING UNIT II
C PROGRAMMING BASICS- COMPUTER PROGRAMMING UNIT II
 
CHAPTER 3
CHAPTER 3CHAPTER 3
CHAPTER 3
 
Introduction to c_language
Introduction to c_languageIntroduction to c_language
Introduction to c_language
 
The smartpath information systems c pro
The smartpath information systems c proThe smartpath information systems c pro
The smartpath information systems c pro
 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01
 
C program report tips
C program report tipsC program report tips
C program report tips
 
File in C Programming
File in C ProgrammingFile in C Programming
File in C Programming
 
A brief introduction to C Language
A brief introduction to C LanguageA brief introduction to C Language
A brief introduction to C Language
 
C functions
C functionsC functions
C functions
 

Similar to introduction to c language

Chapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxChapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxAbdalla536859
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfSubramanyambharathis
 
C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYRajeshkumar Reddy
 
Programming_Fundamentals_Chapter_1_INTRO.pdf
Programming_Fundamentals_Chapter_1_INTRO.pdfProgramming_Fundamentals_Chapter_1_INTRO.pdf
Programming_Fundamentals_Chapter_1_INTRO.pdfBernardVelasco1
 
Whole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThWhole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThAram Mohammed
 
Introduction
IntroductionIntroduction
IntroductionKamran
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programmingRokonuzzaman Rony
 
Introduction.pptx
Introduction.pptxIntroduction.pptx
Introduction.pptxSUDHAKAR S
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptxMugilvannan11
 
Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)Chao-Lung Yang
 
IP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG ProgrammeIP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG ProgrammeSAFAD ISMAIL
 
Introduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic conceptsIntroduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic conceptsssuserf86fba
 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c languagefarishah
 

Similar to introduction to c language (20)

Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
Chapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxChapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptx
 
C
CC
C
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
 
Introduction to c language
Introduction to c language Introduction to c language
Introduction to c language
 
C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDY
 
Programming_Fundamentals_Chapter_1_INTRO.pdf
Programming_Fundamentals_Chapter_1_INTRO.pdfProgramming_Fundamentals_Chapter_1_INTRO.pdf
Programming_Fundamentals_Chapter_1_INTRO.pdf
 
Whole c++ lectures ITM1 Th
Whole c++ lectures ITM1 ThWhole c++ lectures ITM1 Th
Whole c++ lectures ITM1 Th
 
Introduction
IntroductionIntroduction
Introduction
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
 
C_Intro.ppt
C_Intro.pptC_Intro.ppt
C_Intro.ppt
 
Introduction.pptx
Introduction.pptxIntroduction.pptx
Introduction.pptx
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
 
Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Programming in C
Programming in CProgramming in C
Programming in C
 
IP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG ProgrammeIP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG Programme
 
Introduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic conceptsIntroduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic concepts
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c language
 

More from Rai University

Brochure Rai University
Brochure Rai University Brochure Rai University
Brochure Rai University Rai University
 
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,
Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,Rai University
 
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02Rai University
 
Bsc agri 2 pae u-4.3 public expenditure
Bsc agri  2 pae  u-4.3 public expenditureBsc agri  2 pae  u-4.3 public expenditure
Bsc agri 2 pae u-4.3 public expenditureRai University
 
Bsc agri 2 pae u-4.2 public finance
Bsc agri  2 pae  u-4.2 public financeBsc agri  2 pae  u-4.2 public finance
Bsc agri 2 pae u-4.2 public financeRai University
 
Bsc agri 2 pae u-4.1 introduction
Bsc agri  2 pae  u-4.1 introductionBsc agri  2 pae  u-4.1 introduction
Bsc agri 2 pae u-4.1 introductionRai University
 
Bsc agri 2 pae u-3.3 inflation
Bsc agri  2 pae  u-3.3  inflationBsc agri  2 pae  u-3.3  inflation
Bsc agri 2 pae u-3.3 inflationRai University
 
Bsc agri 2 pae u-3.2 introduction to macro economics
Bsc agri  2 pae  u-3.2 introduction to macro economicsBsc agri  2 pae  u-3.2 introduction to macro economics
Bsc agri 2 pae u-3.2 introduction to macro economicsRai University
 
Bsc agri 2 pae u-3.1 marketstructure
Bsc agri  2 pae  u-3.1 marketstructureBsc agri  2 pae  u-3.1 marketstructure
Bsc agri 2 pae u-3.1 marketstructureRai University
 
Bsc agri 2 pae u-3 perfect-competition
Bsc agri  2 pae  u-3 perfect-competitionBsc agri  2 pae  u-3 perfect-competition
Bsc agri 2 pae u-3 perfect-competitionRai University
 

More from Rai University (20)

Brochure Rai University
Brochure Rai University Brochure Rai University
Brochure Rai University
 
Mm unit 4point2
Mm unit 4point2Mm unit 4point2
Mm unit 4point2
 
Mm unit 4point1
Mm unit 4point1Mm unit 4point1
Mm unit 4point1
 
Mm unit 4point3
Mm unit 4point3Mm unit 4point3
Mm unit 4point3
 
Mm unit 3point2
Mm unit 3point2Mm unit 3point2
Mm unit 3point2
 
Mm unit 3point1
Mm unit 3point1Mm unit 3point1
Mm unit 3point1
 
Mm unit 2point2
Mm unit 2point2Mm unit 2point2
Mm unit 2point2
 
Mm unit 2 point 1
Mm unit 2 point 1Mm unit 2 point 1
Mm unit 2 point 1
 
Mm unit 1point3
Mm unit 1point3Mm unit 1point3
Mm unit 1point3
 
Mm unit 1point2
Mm unit 1point2Mm unit 1point2
Mm unit 1point2
 
Mm unit 1point1
Mm unit 1point1Mm unit 1point1
Mm unit 1point1
 
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,
Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,
 
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
 
Bsc agri 2 pae u-4.3 public expenditure
Bsc agri  2 pae  u-4.3 public expenditureBsc agri  2 pae  u-4.3 public expenditure
Bsc agri 2 pae u-4.3 public expenditure
 
Bsc agri 2 pae u-4.2 public finance
Bsc agri  2 pae  u-4.2 public financeBsc agri  2 pae  u-4.2 public finance
Bsc agri 2 pae u-4.2 public finance
 
Bsc agri 2 pae u-4.1 introduction
Bsc agri  2 pae  u-4.1 introductionBsc agri  2 pae  u-4.1 introduction
Bsc agri 2 pae u-4.1 introduction
 
Bsc agri 2 pae u-3.3 inflation
Bsc agri  2 pae  u-3.3  inflationBsc agri  2 pae  u-3.3  inflation
Bsc agri 2 pae u-3.3 inflation
 
Bsc agri 2 pae u-3.2 introduction to macro economics
Bsc agri  2 pae  u-3.2 introduction to macro economicsBsc agri  2 pae  u-3.2 introduction to macro economics
Bsc agri 2 pae u-3.2 introduction to macro economics
 
Bsc agri 2 pae u-3.1 marketstructure
Bsc agri  2 pae  u-3.1 marketstructureBsc agri  2 pae  u-3.1 marketstructure
Bsc agri 2 pae u-3.1 marketstructure
 
Bsc agri 2 pae u-3 perfect-competition
Bsc agri  2 pae  u-3 perfect-competitionBsc agri  2 pae  u-3 perfect-competition
Bsc agri 2 pae u-3 perfect-competition
 

Recently uploaded

Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 

Recently uploaded (20)

Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 

introduction to c language

  • 1. Course: BCA Subject: Programming In C Language Unit-1 Introduction to C language
  • 2. Function OF Computer  Input -- Input devices enable us to get information into a computer. Some examples include a keyboard, mouse, microphone, scanner, or digital camera.  Storage -- There are two types of storage: temporary and long-term. RAM, or random access memory, is temporary, meaning it stores information as you use it, but it is being constantly erased and rewritten as you open and close files. Long-term storage holds information for as long as you want it. Hard drives, portable hard drives, floppy drives, flash drives, CD’s, and DVD’s are long term storage devices.  Processor -- A microprocessor controls the computers’ functions. It is smaller than a dime, but contains millions of transistors that perform millions of instructions per second. The microprocessor performs these instructions using a three-step process: fetch, decode and execute.  Output -- Information that has been processed is communicated back to the user in the form of words, sounds or pictures, and is delivered through printers, speakers, monitors or other output devices. Sometimes output is just written back to a storage dev
  • 3. Basic Building Block Of Computer Control Unit- this is the device or a part of computer responsible or performs such regulating functions.. Arithmetic Logic Unit- this is the part or a circuitry of the Microprocessor chip for arithmetic operations, proportional and related functions, and logical functions. Memory- this is a part of computer or a card or modules that inserted to the motherboard’s slot Input -The System Unit that the system of computer feeds or decode first the data before to display using the output devices of computer. Output Devices- this is refer to the devices of computer that have an ability to display the information or can produce a hardcopy of a document.
  • 7. What is UNIX?  UNIX is an operating system which was first developed in the 1960s, and has been under constant development ever since. By operating system, we mean the suite of programs which make the computer work. It is a stable, multi-user, multi-tasking system for servers, desktops and laptops.  UNIX systems also have a graphical user interface (GUI) similar to Microsoft Windows which provides an easy to use environment.  However, knowledge of UNIX is required for operations which aren't covered by a graphical program, or for when there is no windows interface available, for example, in a telnet session.
  • 8. Cont..  There are many different versions of UNIX, although they share common similarities. The most popular varieties of UNIX are Sun Solaris, GNU/Linux, and MacOS X.
  • 9. What is LINUX?  It is the software on a computer that enables applications and the computer operator to access the devices on the computer to perform desired functions.  Linux is developed collaboratively, meaning no one company is solely responsible for its development or ongoing support. Companies participating in the Linux economy share research and development costs with their partners and competitors
  • 10. Windows  The operating system gives the framework upon which all other services and applications run. The majority of home users use a Windows based machine. Most of today’s applications and games are designed to run solely on Microsoft systems.  Microsoft Windows is extremely popular in schools and colleges, many businesses also use Windows.  The oldest of all Microsoft’s operating systems is MS-DOS (Microsoft Disk Operating System). MS-DOS is a text-based operating system. Users have to type commands rather than use the more friendly graphical user interfaces (GUI’s)available today
  • 11. What is algorithm?  A method that can be used by a computer for the solution of a problem.  A sequence of computational steps that transform the input into the output.  The word ”algorithm” comes from the name of a Persian author, Abu Ja’far Mohammed ibn Musa al Khowarizmi (c. 825 A.D.), who wrote a textbook on mathematics.  An algorithm (pronounced AL-go-rith-um) is a procedure or formula for solving a problem.
  • 12. Algorithm Write an algorithm and draw the flowchart for finding the average of two numbers Algorithm:  Input: two numbers x and y  Output: the average of x and y  Steps:  input x  input y  sum = x + y  average = sum /2  output average
  • 13. Introduction to flowcharts  A flowchart is a graphical representation of an algorithm.  • Start or end of the program  • Computational steps or processing function of a program   • Input or output operation   • Decision making and branching   • Connector or joining of two parts of program
  • 14. Introduction of ‘C’  Root of the morden language is ALGOL 1960. It’s first computer language to use a block structure.  It gave concept of structured programming.  In 1967, Martin Richards developed a language, BCPL (Basic Combined Programming Language)
  • 15.  In 1970,by Ken Thompson created a language called as ‘B’. It used to create early version of Unix.  In 1972,by Dennis Ritchie introduced new language called as ‘C’ .
  • 16. 1972 Traditional C Dennis Ritchie 1990 ANSI/ISO C ISO Committee 1978 K&R C Kernighan &Ritchie 1989 ANSI C ANSI Committee
  • 17. Features Of C  It is robust lang whose rich setup of built in functions and operator can be used to write any complex prog  Prog written in c are efficient due to severals variety of data types and powerful operators.  The c complier combines the capabilities of an assembly lang with the feature of high level language. Therefore it is well suited for writing both system software and business package.  There r only 32 keywords, severals standard functions r available which can be used for developing prog.  c is portable lang , this means that c programes written for one computer system can be run on another system, with little or no modification.  c lang is well suited for stuctured programming, this requires user to think of a problems in terms of function or modules or block. A collection of these modules make a program debugging and testing easier.  c language has its ability to extend itself. A c program is basically a collection of functions that are supported by the c library. We can contuniously add our own functions to the library with the avaibility of the large number of functions.  In india and abroad mostly people use c programming lang becoz it is easy to learn and understand
  • 18. Basic structure of C programming  To write a C program, we first create functions and then put them together. A C program may contain one or more sections. They are illustrated below.   Documentation section  Link section  Definition section  Global declaration section  main () Function section  {  Declaration part  Executable part    }  Subprogram section  Function 1  Function 2  …………..  …………..  Function n (User defined functions)
  • 19. Basic structure of ‘C’ Documentation Section It has set of comment lines(name of program, author details). What is Comment line??  To guide a programmer to write a note for function,operation,logic in between a program.  Non-executable statement.  Can’t be nested. e.g:- /* Hello /* abc */ Hi */ ERROR.
  • 20. Link Section It provides instructions to the compiler to link function from the system library. # include Directive:-  To access the functions which are stored in the library, it is necessary to tell the compiler , about the file to be accessed. Syntax:- #include<stdio.h>  stdio.h is header file.
  • 21. Definition Section  defines all symbolic constants.  #define instruction defines value to a symbolic constant.  #define:-  It is a preprocessor compiler directive, not a statement.  Therefore it should not end with a semicolon.  Generally written in uppercase.
  • 22. Global Declaration Section  Some variables that are used in more than on function, such variables (global variables) declared in the global declaration section.  It also declares all the user-defined function.
  • 23.  Every ‘C’ program must have one main() function section.  It contains two parts 1) Declaration part:  It declares all variables used in the executable part. 2) Executable part:  It has atleast one statement. Main() function section
  • 24. A simple C program: Printing a line of text #include <stdio.h> main() { printf(“hello, worldn”); } Program output: hello, world
  • 25. Executing a C program : Executing a C program involves a series of steps. They are,  Creating the program.  Compiling the program.  Linking the program with functions that are needed from the C library.  Executing the program.
  • 26. How to run a program?  There are two ways to run programs written in a high-level language.  The most common is to Compile the program  The other method is to pass the program through an interpreter.
  • 27. Compiler Why compiler is require ? As machine (a processor) can operate On binary code instruction only…..If we use higher level language then …For execution of the program we must Convert it to lower level / machine level Code.
  • 28. Means, A program that translates Source code into object code. The compiler derives its name from the way it works, looking at the entire piece of source code and collecting and reorganizing the instructions.
  • 29. Interpreter: which analyzes and executes each line of source code without looking at the entire program. Advantage of interpreter: It can execute a program immediately. Compilers require some time before an executable program emerges. But, However, programs produced by compilers Run much faster than the same programs executed by an interpreter.
  • 30. Compiler checks for syntax errors if any on success coverts ‘C source code into object code form which is nearer to machine…
  • 31. process of compiling and running a C program
  • 32.
  • 33. References: 1. Programming in C by yashwant kanitkar 2. ANSI C by E.balagurusamy- TMG publication 3. Computer programming and Utilization by sanjay shah Mahajan Publication 4. .www.cprogramming.com/books.html 5. en.wikipedia.org/wiki/C_(programming_language) 6. www.programmingsimplified.com/c-program-example 7. http://cm.bell-labs.com/cm/cs/who/dmr/chist.html 8. http://en.wikipedia.org/wiki/Comparison_of_programming_languages 9. http://en.wikipedia.org/wiki/List_of_C-based_programming_languages 10. http://en.wikipedia.org/wiki/C_(programming_language)