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)
3 views
c programing 1st unit introduction to programming
1st
Uploaded by
krishnayaswanth93
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save c programing 1st unit introduction to programming For Later
Download
Save
Save c programing 1st unit introduction to programming For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
3 views
c programing 1st unit introduction to programming
1st
Uploaded by
krishnayaswanth93
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save c programing 1st unit introduction to programming For Later
Carousel Previous
Carousel Next
Save
Save c programing 1st unit introduction to programming For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 11
Search
Fullscreen
v “asics ors commures S PROGRAMAlgorithin:Introduction To Programming, “Saleh Savtee Convent tAEO ony Fea Melivences: The operations of ihe algorithm must be effective stich ¢Hat it my onl te asily converted into machine code in a finite amount of time ‘one of more inputs and one ithm for adding Ovo numbe Start Y Flow chart is diagrammatic representation of an algorithm, ¥ It is built using different types of boxes of symbols. Y The operation to be performed is written in the box. ¥ All symbols are interconnected by arrows to indicate the flow ofinformation and processing,Input / Output ‘start/stop/begin/end symbo ieee ee Making data available for processing (inPut) OF recordings, the processed information __ (outpud), Process “Any processing t0 be performed. An assignment represented by this symbol, Decision or switching type of operations that determines which of the alternative paths is to be followed. Connecter ‘Used for connecting different parts of flow chart. Joins two symbols and also represents executions flow. ‘Bracket with ‘broken line Annotation Descriptive comments or ‘explanations ‘Double sided Predefined. ‘Modules or subroutines given elsewhere.isthe structure ofa C Program. Se Link Section —___—| Sete eon _—__— fuating) Function Section (Decinration part Executable part sion consis of ott comment lines giving the mame of tion Setion:- The docursentaton et ‘woul ike 0 use ser the author snd otber detail, which the programmes yoaypes of comment ines elo. Je ine comment using the symbol / ple’ (Tis ¢ Programming jtline comment using the symbo}/* >i thee program “To learn aod pctice *Y eto ries tins f eine hk nn on tes a, © staiohanio hm al the Fuions which ae defined by this provide plenty of Hibrary Tike eb attach othe curen programs i the flowing W9y. clink between eureit program tothe ary function, en section The dation selon dares al symbsie corslan&.Usng. ch S = PES nae 8 biol eed provides th fine PL3.141 ‘pdefine X20 A fin section:= There ar some vajabls that are cied in more than one fantion, Such te declared in the glob declaration section tht is outside ofall lee called global vatles a Scr cetion aso deceres all he uset- defined fnctons Se runction sectlon:- Every © program mus! have one nan funcion incor son contains two pars, declaration part and executable part pat declares lhe vars wei excuse put ee th areentble part. Tete No pts mA. appear Between the opening Be evuton begins at the opening brace and ends atthe closing brace reevetion fe the logical end of the program. All satements inthe a east one saterent i ing braces. THE POE soa trace of ie rain foncti ‘race 0se pats end with a semicolon ov are cated in the ia faction, gy sect con al eerie unto th 3 A peerinty ate generally paced iomeditly fer the wa ~Allsecon, espe mas anton oan my bet when ey rte Ee 1. Write C Program to print welcome message. _ included > oid maing t print" WELCOME’, 3 ‘OUTPUT: WELCOME 2. Write a € program for adition of mambers #inelude
void main() { invade: elise) 2100; b= 200; enaib; prindt*\n sum=Y%6d",0); ) ourruT: geis done using daar A whic Tecaing meory oF al ASAP eg = oatng, STAC eo 1 USE. ecg ‘of data that a le can store such as inte Pie. i ise in a program. ‘Variables or functions of dtferent types before ( Data Types in C sare 4 types of datatypes in C language Data typesfollowing are some main primitive data types in C: e Seats ts Ci wed oe te ue Ve and zero without decimal part), Octal values, hexadecimal values, and decima, He stored init data ype in C. We usedutkxsaaraso declare the inteust variable: S 7 Range: -32768 to 32767 ” > a Stn ayes a = Format Specie: Ya (Syntax for declaring the Integer variables int var_name: aes £ The niger datatype can also be used as A© ‘unsigned int: Unsigned int dato type in Cis used to store the data. values ftom 22 fo _-ambers but tan sore gave values ie ined int 2 short int: iis lesser in size tan ho an ee oe Larger version of the int datatype so can store values greater than int, ce yon os xsiged int i can only store values ffom 3273 Note: The size ofan integer data type is compiler dependene. We can use sizeof operator toch actual size of any data F data type allows its variable to store only a single character. The sizeof he cad byte. It is the most basic data type in C_Tr store = Slagle character and requires singe ‘memory in amos allsompilers. The char Keyword is uscd to declare the varabe of chara a «Range: (-128 to 127) or (0 to 255) + Size: | byte sax idedadag he Cm es rr ie ‘char var_name; char ased to store ming float datatype is used to store floating-point values. Flout in C : is used to store deci " swith floating pom ‘exponential values. It is used to store decimal mumbers (numbers a floating point ingle precision, The float keyword is used o declare he variable as Range: 120-38 1 348498 Sine: 4 bytes Format Specifier: %6t laring the floating point variables: data type is basically a precision sort of datatype that is capable of holding 64 bits of points. Since double has more precision as compared to that float then ‘occupies twice the memory occupied by the floating-point type.It cay point. The variable can be declared ) ‘The void data type in C is used to specify that no value is present. It does not 1k value to its caller, It has no values and no operations. It is used to represent nothing*ssoyesodQ, don soyeiodo oy st + pue spuesodo “UNS2y Paaisop 94 393 0} spu sojqetiea outs sie sioresodo uy "voneiodo uy susioy.od exp joquig » s) sowwiodo wyBa aemint opie ical values (constants and variables). re the working of arithmetic operators ‘printit'a+b = %d \n",¢); math; printf("a*b-= %d In"): cal printi('a%o = Yd \n',); oath; Brintit"Remainder when a divided by b 044 i \n",c);when a divided by bet ip berveen wo operands: ye variate chooks the relations om Jn fae It returns value 0, Operands may in decision making ans loops Operators: A relational o tom is eve, Ht returns 15H i greater than oF equal to is equal to 95d = %d\n", a,c, a= 0); False se %od= %d\n", 0, b, a> bs Yod= Yd \n", a, 60>); false Y= 9d \n", a,b, a); false < Yok = %d \n", a,c, 6)i
You might also like
foc unit-5
PDF
No ratings yet
foc unit-5
12 pages
Computer Program
PDF
No ratings yet
Computer Program
23 pages
fpl
PDF
No ratings yet
fpl
338 pages
Programing in C - A Study Material
PDF
No ratings yet
Programing in C - A Study Material
90 pages
PPS Unit 1
PDF
No ratings yet
PPS Unit 1
50 pages
Presentation 11677 Content Document 20231014034322PM
PDF
No ratings yet
Presentation 11677 Content Document 20231014034322PM
77 pages
Data Types
PDF
No ratings yet
Data Types
11 pages
Programming in C - SAE1A
PDF
No ratings yet
Programming in C - SAE1A
33 pages
Unit 2 CP
PDF
No ratings yet
Unit 2 CP
23 pages
MC0061
PDF
No ratings yet
MC0061
75 pages
PROBLEM SOLVING USING C NVG
PDF
No ratings yet
PROBLEM SOLVING USING C NVG
71 pages
Module 1
PDF
No ratings yet
Module 1
82 pages
Character Set & Identifiers
PDF
No ratings yet
Character Set & Identifiers
30 pages
Gopi b.com CA c Notes Final
PDF
No ratings yet
Gopi b.com CA c Notes Final
84 pages
Pps Module 1
PDF
No ratings yet
Pps Module 1
20 pages
C Basopr Ref
PDF
No ratings yet
C Basopr Ref
35 pages
PPS ch2
PDF
No ratings yet
PPS ch2
34 pages
Data Types Variables Constant
PDF
No ratings yet
Data Types Variables Constant
35 pages
Question_and_answers_-_Programming_in_C-1
PDF
No ratings yet
Question_and_answers_-_Programming_in_C-1
75 pages
C Language
PDF
No ratings yet
C Language
33 pages
Oops
PDF
No ratings yet
Oops
52 pages
Programming Fundamentals
PDF
No ratings yet
Programming Fundamentals
169 pages
C in A Practical Way
PDF
No ratings yet
C in A Practical Way
193 pages
C Programming
PDF
No ratings yet
C Programming
31 pages
C Data Type Note
PDF
No ratings yet
C Data Type Note
22 pages
Question of The Day: 2D1350 Programeringsparadigm
PDF
No ratings yet
Question of The Day: 2D1350 Programeringsparadigm
19 pages
DOC-20231025-WA0005
PDF
No ratings yet
DOC-20231025-WA0005
157 pages
02-CP Lab Manual PDF
PDF
No ratings yet
02-CP Lab Manual PDF
71 pages
Introduction To C (CH-1) : Program
PDF
No ratings yet
Introduction To C (CH-1) : Program
124 pages
AOP unit 2 chapter 1.pptx
PDF
No ratings yet
AOP unit 2 chapter 1.pptx
88 pages
unit 1
PDF
No ratings yet
unit 1
153 pages
Internship Report C and C++
PDF
No ratings yet
Internship Report C and C++
31 pages
Class 1 PDF
PDF
No ratings yet
Class 1 PDF
14 pages
Components of C Program
PDF
No ratings yet
Components of C Program
64 pages
Unit 01 Part1 Notes
PDF
No ratings yet
Unit 01 Part1 Notes
180 pages
C - Basic Introduction: Fundamentals of Computer Programming
PDF
No ratings yet
C - Basic Introduction: Fundamentals of Computer Programming
65 pages
PPT01-Introduction To Algorithm and Programming
PDF
No ratings yet
PPT01-Introduction To Algorithm and Programming
38 pages
C - Review: Appsconnect Technologies PVT LTD
PDF
No ratings yet
C - Review: Appsconnect Technologies PVT LTD
70 pages
Unit II C Fundamentals SGT
PDF
No ratings yet
Unit II C Fundamentals SGT
71 pages
1 Introduction
PDF
No ratings yet
1 Introduction
62 pages
C Programming Notes
PDF
No ratings yet
C Programming Notes
66 pages
CS10003: Programming & Data Structures: Spring 2021
PDF
No ratings yet
CS10003: Programming & Data Structures: Spring 2021
60 pages
3 History Types Var Const (1)
PDF
No ratings yet
3 History Types Var Const (1)
43 pages
Chap 2
PDF
No ratings yet
Chap 2
48 pages
Programming in C MCA-103: Priyanka Jain PE-II (F) CDAC Noida
PDF
No ratings yet
Programming in C MCA-103: Priyanka Jain PE-II (F) CDAC Noida
60 pages
C Solution 2005
PDF
No ratings yet
C Solution 2005
15 pages
Unit 1 - II Consts Vars and Data Types
PDF
No ratings yet
Unit 1 - II Consts Vars and Data Types
36 pages
UNIT 1 NOTES
PDF
No ratings yet
UNIT 1 NOTES
46 pages
C Programming Notes
PDF
No ratings yet
C Programming Notes
66 pages
Programming in C Chapter 3
PDF
No ratings yet
Programming in C Chapter 3
13 pages
C Programming1
PDF
No ratings yet
C Programming1
22 pages
IP Prefinal-4
PDF
No ratings yet
IP Prefinal-4
21 pages
History of Social Media
PDF
No ratings yet
History of Social Media
64 pages
Unit 1 Programming in C and Primitive Data Types
PDF
No ratings yet
Unit 1 Programming in C and Primitive Data Types
26 pages
Vision Cs 2024 Data Sturcture Programming C Programming 15
PDF
No ratings yet
Vision Cs 2024 Data Sturcture Programming C Programming 15
33 pages
IP
PDF
No ratings yet
IP
10 pages
BCA C Programming
PDF
No ratings yet
BCA C Programming
103 pages
C Programming
PDF
No ratings yet
C Programming
33 pages
Related titles
Click to expand Related Titles
Carousel Previous
Carousel Next
foc unit-5
PDF
foc unit-5
Computer Program
PDF
Computer Program
fpl
PDF
fpl
Programing in C - A Study Material
PDF
Programing in C - A Study Material
PPS Unit 1
PDF
PPS Unit 1
Presentation 11677 Content Document 20231014034322PM
PDF
Presentation 11677 Content Document 20231014034322PM
Data Types
PDF
Data Types
Programming in C - SAE1A
PDF
Programming in C - SAE1A
Unit 2 CP
PDF
Unit 2 CP
MC0061
PDF
MC0061
PROBLEM SOLVING USING C NVG
PDF
PROBLEM SOLVING USING C NVG
Module 1
PDF
Module 1
Character Set & Identifiers
PDF
Character Set & Identifiers
Gopi b.com CA c Notes Final
PDF
Gopi b.com CA c Notes Final
Pps Module 1
PDF
Pps Module 1
C Basopr Ref
PDF
C Basopr Ref
PPS ch2
PDF
PPS ch2
Data Types Variables Constant
PDF
Data Types Variables Constant
Question_and_answers_-_Programming_in_C-1
PDF
Question_and_answers_-_Programming_in_C-1
C Language
PDF
C Language
Oops
PDF
Oops
Programming Fundamentals
PDF
Programming Fundamentals
C in A Practical Way
PDF
C in A Practical Way
C Programming
PDF
C Programming
C Data Type Note
PDF
C Data Type Note
Question of The Day: 2D1350 Programeringsparadigm
PDF
Question of The Day: 2D1350 Programeringsparadigm
DOC-20231025-WA0005
PDF
DOC-20231025-WA0005
02-CP Lab Manual PDF
PDF
02-CP Lab Manual PDF
Introduction To C (CH-1) : Program
PDF
Introduction To C (CH-1) : Program
AOP unit 2 chapter 1.pptx
PDF
AOP unit 2 chapter 1.pptx
unit 1
PDF
unit 1
Internship Report C and C++
PDF
Internship Report C and C++
Class 1 PDF
PDF
Class 1 PDF
Components of C Program
PDF
Components of C Program
Unit 01 Part1 Notes
PDF
Unit 01 Part1 Notes
C - Basic Introduction: Fundamentals of Computer Programming
PDF
C - Basic Introduction: Fundamentals of Computer Programming
PPT01-Introduction To Algorithm and Programming
PDF
PPT01-Introduction To Algorithm and Programming
C - Review: Appsconnect Technologies PVT LTD
PDF
C - Review: Appsconnect Technologies PVT LTD
Unit II C Fundamentals SGT
PDF
Unit II C Fundamentals SGT
1 Introduction
PDF
1 Introduction
C Programming Notes
PDF
C Programming Notes
CS10003: Programming & Data Structures: Spring 2021
PDF
CS10003: Programming & Data Structures: Spring 2021
3 History Types Var Const (1)
PDF
3 History Types Var Const (1)
Chap 2
PDF
Chap 2
Programming in C MCA-103: Priyanka Jain PE-II (F) CDAC Noida
PDF
Programming in C MCA-103: Priyanka Jain PE-II (F) CDAC Noida
C Solution 2005
PDF
C Solution 2005
Unit 1 - II Consts Vars and Data Types
PDF
Unit 1 - II Consts Vars and Data Types
UNIT 1 NOTES
PDF
UNIT 1 NOTES
C Programming Notes
PDF
C Programming Notes
Programming in C Chapter 3
PDF
Programming in C Chapter 3
C Programming1
PDF
C Programming1
IP Prefinal-4
PDF
IP Prefinal-4
History of Social Media
PDF
History of Social Media
Unit 1 Programming in C and Primitive Data Types
PDF
Unit 1 Programming in C and Primitive Data Types
Vision Cs 2024 Data Sturcture Programming C Programming 15
PDF
Vision Cs 2024 Data Sturcture Programming C Programming 15
IP
PDF
IP
BCA C Programming
PDF
BCA C Programming
C Programming
PDF
C Programming