Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
13 views
20 pages
Chapter 2
Uploaded by
Divyanshu Rawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save Chapter 2 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
13 views
20 pages
Chapter 2
Uploaded by
Divyanshu Rawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save Chapter 2 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save Chapter 2 For Later
You are on page 1
/ 20
Search
Fullscreen
Introduction toc Language Describe Generation of Languages To Learn ston of ¢ Language Describe Fst ¢ Program Describe Strctre ofa ¢ program Expain Character Set of C Language Expain Words ina C Language 6 oeeeo8 Arie oar egal sec of scons wit sy peranmig nga at gles computer to acheve a predenned soliton, The process of wntingya computer Hota sealed programming. General mary computer progims av combed fe ke Softwar Aoftwre ia colecton of aierent programs, procedures snd documentation combine together perform 8 task using computer. Sofware casaied fy too catego. system Softwa an appenionsorenre. Sytem sofware Isa clectan cf programs tat alows an eticem raion between the Paewareef'3 Computer and te ier pertng. syste “ansat e,aa oder are examples o s)tem software, Appa selnae ia clacton ef programa alos user to prorm 2 specie dats processing actty on 2 computer. Toe daa Procesegactvy canbe of anerent pes such 9s manasngstounts chop pulestion (OTP) Sntabasemanagement. snd communistion. ‘ne JBM ask wny do we need to learn 2 new language o write a computer program, Why nt Simpl wits te progam Inthe lngsages wn toss. sien ss Engity, French snc or Stank? Well te reason Is tata insucton wren In natura guage st tines ca Pav aiming Fr compte sans fo work een hss ness tb aod A progfmming lngiage is now 38 formal engage andi ere from ntl angege Coast of rar ues 2 rata angag aa sto pede ron Sloe Sy the ngage designer ‘Thase rules frm te sat of ht language an cee how to wre ‘stuns irs programing ngunge, Toe res species sso quatante tht on ntact wi ave ane and only one meaning. To an» programming language. we ony need t ler new ‘main eee esr intra irgooness fr rape we want pk or wre Fe lngsge ety, west nena to ante aroma of Hn nae Ths pla aanses in bette generation of arguoges sory of 3 formal ngage eles C reste te propa, and te corset sted fo wrt program mC erguage The wor In laguage re also cscussed, and aly, the chapter ends withthe creation and execution of C Progamprea wate of 2 computer “hardware. From gorse nto" erty anguage generations ne ration of CO wih te evo" rye promeamming PADS ving tangueaes CaN Me enn dca = 4 jsted of strings of only tw: + Pen tinue po amy a Brian aye eee tron moo, diniegoe St ote fer second anrtion a sr ee aay om pci ri cmp os ra de samen me rete ant see te pee ie a Saute neo om on seer a scr eter me roan wo mcr Ae era eet ip sae c= ee LD cemoer yaar true Howe sereeecines Yar router a's a i on rae Sonos 1 Third Generation ‘Trigeneration programming languages became a boon to the programmers. The: rove ore natal means of developing programs by enabling the users to writ Hovrans wing Etlsnlngwoe sh se sates of» progran, Such pogtsoas languages are in use today and are called high-level languages. (sf the tic. generation programming languages named COmmon Business Oriented Language (C0801) became 2 sucess language used for writing business appicaticn es anus busines domains. C language also falls inthe category of third generation raupefoia sone ators cone as a midleleve language, The sistent eral, howe the dacusson on Ri ost ote scope of tis book. We wil cone Fourth Generation The sage of stcond and tie {and person The ffx of, rater eae of onmrration languages needs the user to be technica soupuiets In most every home has resuited to ae earamming languages. programming langeace 2.249 designe that even nontechnical users can develop thelr awn applations. The main focus when using fourth generation inquage Is rapid development of apleatons. Report generators. query languages, and. apleaton generator are examples ot the fourth {eneration languages, = Fifth Generation he 4 aogerrtonpsranming rao s bse on te concn of sing robins Using constraints given to the program. rather than using an ago writen by programmer. uses the domain of artificia ineigene (alto obtained constraint 2aeed folitions: The fith-generaton language can be coniered ae an ttmpt to make a ompute behave siniar to human bang behave Future devlopent inthe ara ofA may result in programming system tat accepts spoken statement from 9 see and then generates a computer program intended to produce te reaured output Today, none ofthe hve anquage generations mentioned eater has become obsolete. We are using all the fve generations of anguoges at rome pont of time, The ure may fe thatthe st and second-generation anguoges ae not used by inher ety. Bu Is eens se rey te an wot ses Komi, Te eon te Same given in he endo his chapter 2.2 History of C Language The orgn of C language dates back o 1872, Dons. ici I the man whe owns the ret of cresting the language. Tewas deve from the Bane. Common Purpose Programming Languege. common kaown as BoP. Me am a ceveapng C ngunge wes fo bua a rust system sotware, However became» pet ofthe programmers nthe ‘coming yes, and as been used fr devloping 3 hind of roftaare. Hence 1 as come tarbehnown a a genera purpose programming 9.392 [Athough crate in 1972, was standard n 1989 bythe Ameren Navona! Sansa Insite (ANS Since than. came fo be hrown as ANSI C. Vengo sch a8 APD Borland, Merosor, ond IBM have but ther own versons of and © compiers based on the ANSI standards Some of em fave even provded_anlntegfted development favrenment. more comony, krown 3b 196, for easy and fast devecpment of C programs. E18 A structured language for programming, 1 sows the program to be spt inte Subprogram hnown as function nee generate. these futons ae reusable. Set of ten renctons then consutes 2 program The approach of spit 8 program Into fubprogram Is known as rodulr programming, ‘THe maul approach of programming Fetps ce to'slve prot rising Inthe exgn of he program esi 25 we have to Concertate on sty ene function rater than an ene program. Usuny programs feta C anguape can be ported to ferent machines having diferent operating Syn an cones wit aost reggie moaieaon Tus is coniered to bet poreble ngvage E Fes surprising to know that we are surrounded by C programs. Aosta operating ystems suchas Windows, Uni. and Linu, have & large bocks of C program codes In am: you rene te code om these opeesing systems possibly the entre operating stom ay crah,Databses such as Gace, MySQL. abd networking proces aso use Cof the € programs if gormtion Teche predefined ste fs struct ow Be nehuae Mat ‘ Feup towards Tenrnto8 ‘e Languages") sows to et a ness wa one of ea ocwe pore eT eto _ agree 0200 Language) towards leaning C' working of rogram 1 ne is not Incuded In me feed for aocurentation purest sr aneder fe, Next. main) 15 Koo ncn as an ul cx a uray fonction. eeu by wers as per tet requirement. 7 Tag hata user can make use oF in 8 BS sere understand the structure of 2 C Pros™ 12, Program 2 aLanguage «24 Wo ealeuiste e\rcanter Betictieere, . tsvieget fret enter the Valve of cau Pr atrasivs): 3s Serre racivs; | > Tee se a anion oF clrenteance Tlreunference of circle with rad in that iniates the purpose of poor oe directive that instructs the complet nce the contents of fe stloih This fe contains lformation about the nblt functors te sss symbolic constant PI hat has value 3.14. Tis statement aso Me preprocessor drscuve It ituc the Waster to pct Ee Ar Pt withthe vlue 3-18 before executing te program Joa iser-deined function main} 11s 2 most fo aC programs beginning of function man) two varabes {rads and Tecimal vues, The ter variate Crs Mend raniplation can alse change the stored ls He abult function pein rit 2 message on he mnt crt. These varales are capi of inte unetion scarf to red 3 value of discussed i decal ate cP functions have (expression; a formula to Hmartge along win tne vas of aver 2s and sere. . Heyer re tern. we St Say at Sg messy Pocono Star open ofthe program. but a perma!Breer uc vcs cere Teste habe rn rm Proens 108 2 00 yyy grenadine ny €or, Mince COTA wT Tan an ae The con feces aN UN ss ect eral) eeu enc ove oar ana udev ing toked at two simple Cr ral tne complete structure of a €Proa" Structure of a C program collection of blocks ced From Program 1 and 2, we can say that a C program 15 @ From Progr tenon made up of one or more statements used fOr Performing taped tak. gre 2 shows a complete strutue of Program Figure 2 shows that to section sections are optional sections and may of may not be pres: Pogtam However, the tmpusory section tat cman the function main wl a be present na ¢ program SY uh fh scons town In Powe 2 se cscs In dal ne fo = Documentation Section ‘Documentation section sa optional section nthe structure of a intcte. ris used forthe purpose of eocumentaton sna ray purpose of program. author deta mportnt log! aspect. ae ares pan eas sctiaa eal coreren ee pening (*) and closing (7) tokens to represent 2 tnclosed between /* and */, It Is considered a8» cor processed by C compiler andar lef as they aeefor any fea tuncton Gjamave ove Fomine rst reprogea Hepa fries aes ty aot be presen emai wa in te fotiows fuaes $F eraion oom es inc regam canbe sed aye na pont arments tn te foci 0 mene rssh Bh coment canbe 2 sglneconmert 2 me Pimefcommentssrelstecin tive? Tage proves one ote st of fokens De seen In Table 2. ¢ nt AC statement that Bis not processed. The cha sgl ine the comment exceeds fin ely we an also pref exc ne Dy Constant Definition Be ace zoe s sed to dete ay smb Retepuce ai cccrrences of aymlc consans pene constants are usualy ceed usa OP ec programs. Two eames of te symbaie Teale cennes a symbol constant P04 Beare camatant fo pis were. Pane Sr ce of 314 and print wit nat Ne ide Section aerve a uge ut of mit of teary rons 9 99% an sar. Tes Besa rt Fed on ota os ue beower, and ancien sar 1 US 1913 ay [ae fe Ped ntrmaon about ese neon. nC. Sena es at Nope le exe TH Ta 1 eh sa programs nce
Ae ist of header les avai Daath Append FH OOK slobal Variable Declaration Section Pear crass everest Bae ee yn es escape othe vroble, wih 6 decided, or ecg cay Hes (). TOE on pega se pete varies fads and we ON Se ae sr: Tee ves coat be aed ov MOP varie of he eerie nate foc, such a arabe 5 HOw Ot ed ae etre eg ate fons The gataled cision ofS Tis waa pe aon in chapter dealing wth futons i C angus, ‘Main Function 1 arms cannot We main). Tis 16 the function fon ‘bere ai one grogram starts. The control i fst transfered tos Ft thers, the es of te operations ae cated out [9 PFOBaMS | 372 Fat alvin) the probe part ofthe function malo 11 posible Na greener eet ein uneton main uses Ie or so} User-Defined Function ‘program pres us a ay of sting stage program nto st of. “These functions can then be used Independently i tr Fseectonsr = Say prepa. nts subsection, we wl Cee escent cvozna ny Eoe 2 ni on, sa ot pogo Reape ota epee een fer amp ies te ean ec Fr ca penn Santa esa campe ate CT > royom3 TF Program to wat tioly two runbers *7 include
Chapter? took ists the ASC values associated with sltferent character Examples of single-character constants are, j 7 and 7 «© String Constant String In C represents set of characters. It Is d ‘enclosed within double quotes. String constants don't have any ASC with fC, string constant “H” Is not equal to slagie character c happens because of the way In which these constants are stored string constant “H" wil be allocated two memory spaces, while” wil be ‘one memory space, Tis Is due to the fact that strings In C are ened by null character. Examples of string constants are “C Programming”. “La = Back Slash Characters C language provides a special twocharacter constant. These constant slash characters or escape sequences. They are known a5 back sla first enaracter is always a back slash (\), and as the output of these const Drntable character bt white space, they are also known a3 escape sequence Simla to single
deine. includes ale named define In © program. 1». Visa ala singe character constant. The etesion of C executable program Is exe. %, Get vat sting constant. YA To include z = symbole constants in € program, we use Temas ens cnt in € program, we use documentation selon Saba me et san acter ue Gems al) represent vavable name os. Practical Exercises Gh lw paces 2 ara conver a ns pga oven cenit sa eaaR Ht cI me fp mane inte program to accepts rune kilometers a mf ate MEM eo Wate a pogran SC number W and ing height. cept a ts square,
You might also like
C-Programing by Pankaj Sir
PDF
100% (1)
C-Programing by Pankaj Sir
43 pages
Kiran Sir (C Notes)
PDF
100% (1)
Kiran Sir (C Notes)
198 pages
Gnu C Programming Tutorial
PDF
No ratings yet
Gnu C Programming Tutorial
290 pages
Kiran Sir C Notes PDF
PDF
No ratings yet
Kiran Sir C Notes PDF
198 pages
Balu Sir New C PDF
PDF
No ratings yet
Balu Sir New C PDF
450 pages
C PROGRAMMING 2020 Lesson 1 and 2
PDF
100% (1)
C PROGRAMMING 2020 Lesson 1 and 2
10 pages
I1101 en PDF
PDF
No ratings yet
I1101 en PDF
153 pages
Effective Explanation of C Programming Language
PDF
No ratings yet
Effective Explanation of C Programming Language
292 pages
C-Language (All Concepts)
PDF
100% (3)
C-Language (All Concepts)
129 pages
Balu Sir New (C) - 2-450
PDF
No ratings yet
Balu Sir New (C) - 2-450
449 pages
Lecture SP05 Overview of C Language
PDF
No ratings yet
Lecture SP05 Overview of C Language
32 pages
C Notes Updated
PDF
No ratings yet
C Notes Updated
223 pages
Balu Sir New C
PDF
No ratings yet
Balu Sir New C
450 pages
C For Beginners (Ian SINCLAIR)
PDF
No ratings yet
C For Beginners (Ian SINCLAIR)
246 pages
C Programming Notes Compressed DhzuC
PDF
No ratings yet
C Programming Notes Compressed DhzuC
123 pages
C-Programming Fundamentals
PDF
No ratings yet
C-Programming Fundamentals
179 pages
C Notes PDF
PDF
No ratings yet
C Notes PDF
198 pages
MANUAL Embedded July 2024
PDF
No ratings yet
MANUAL Embedded July 2024
123 pages
Kiran Sir (C Notes)
PDF
No ratings yet
Kiran Sir (C Notes)
198 pages
Unit 1-3
PDF
No ratings yet
Unit 1-3
125 pages
Engr Martins Aspect MTE201
PDF
No ratings yet
Engr Martins Aspect MTE201
85 pages
Unit 1 - Programming Fundamental of C (12th February 2025)
PDF
No ratings yet
Unit 1 - Programming Fundamental of C (12th February 2025)
60 pages
Cnotes
PDF
No ratings yet
Cnotes
40 pages
Introduction To PPS
PDF
No ratings yet
Introduction To PPS
74 pages
C&C
PDF
No ratings yet
C&C
35 pages
C Book
PDF
No ratings yet
C Book
117 pages
Introduction To Computer
PDF
No ratings yet
Introduction To Computer
48 pages
Lecture 1
PDF
No ratings yet
Lecture 1
51 pages
C Notes
PDF
No ratings yet
C Notes
69 pages
Unit 2 Notes
PDF
No ratings yet
Unit 2 Notes
41 pages
C Language Tutorial Keypoint-Version 1
PDF
No ratings yet
C Language Tutorial Keypoint-Version 1
14 pages
Computer 20 Programming Chapter 202
PDF
No ratings yet
Computer 20 Programming Chapter 202
19 pages
C Programming
PDF
No ratings yet
C Programming
49 pages
Module1 Chapter4
PDF
No ratings yet
Module1 Chapter4
20 pages
Unit - I Introduction To C
PDF
No ratings yet
Unit - I Introduction To C
30 pages
Name: John Joseph Course: CSC 202 Course Title: Comp Programming Ii MATRIC NO: U23MTH1020 Department: Mathematics
PDF
No ratings yet
Name: John Joseph Course: CSC 202 Course Title: Comp Programming Ii MATRIC NO: U23MTH1020 Department: Mathematics
18 pages
Lecture 1 Introduction
PDF
No ratings yet
Lecture 1 Introduction
28 pages
Solar
PDF
No ratings yet
Solar
15 pages
P Languages
PDF
No ratings yet
P Languages
14 pages
Lecture Notes C (#1-#6)
PDF
No ratings yet
Lecture Notes C (#1-#6)
8 pages
Ch01-Introduction-To-Cprogramming Language
PDF
No ratings yet
Ch01-Introduction-To-Cprogramming Language
31 pages
C Programming
PDF
No ratings yet
C Programming
9 pages
Unit I
PDF
No ratings yet
Unit I
21 pages
Arnab Sir1
PDF
No ratings yet
Arnab Sir1
8 pages
cs8251 Programming in C Notes PDF
PDF
No ratings yet
cs8251 Programming in C Notes PDF
91 pages
1 CP
PDF
No ratings yet
1 CP
18 pages
Unit 1 Notes
PDF
No ratings yet
Unit 1 Notes
5 pages
C4Java 2
PDF
No ratings yet
C4Java 2
78 pages
L02 - Introduction To C
PDF
No ratings yet
L02 - Introduction To C
43 pages
Chapter 1 - Introduction To Computers and C++ Programming: Outline
PDF
No ratings yet
Chapter 1 - Introduction To Computers and C++ Programming: Outline
12 pages
C Language - Overview
PDF
No ratings yet
C Language - Overview
7 pages
Introduction To Programming Language USING C (CC-102)
PDF
No ratings yet
Introduction To Programming Language USING C (CC-102)
35 pages
Day 1 CLANG
PDF
No ratings yet
Day 1 CLANG
7 pages
EEE3801 Computer Programming For Engineering - Chapter - 01
PDF
No ratings yet
EEE3801 Computer Programming For Engineering - Chapter - 01
24 pages
CSE 181 Lecture Notes
PDF
No ratings yet
CSE 181 Lecture Notes
43 pages
C Features
PDF
No ratings yet
C Features
3 pages
C Lessons by Chris Sawtell
PDF
No ratings yet
C Lessons by Chris Sawtell
60 pages
Intro C Prog
PDF
No ratings yet
Intro C Prog
211 pages