30
Ph. No.: 4000670, 9729666 bsite:www.batracomputercentre.com Email Id: info.jatinbatra@gmail ISO CERTIFIED

45 Days C Language Training In Ambala! Batra Computer Centre

Embed Size (px)

Citation preview

Page 1: 45 Days C Language Training In Ambala! Batra Computer Centre

Ph. No.: 4000670, 9729666670Website:www.batracomputercentre.com

Email Id: [email protected]

ISO CERTIFIED

Page 2: 45 Days C Language Training In Ambala! Batra Computer Centre

45 Days C Language Training In Ambala

BATRA COMPUTER CENTRE

Email Id: [email protected]

Ph. No.: 4000670, 9729666670Website:www.batracomputercentre.com

Page 3: 45 Days C Language Training In Ambala! Batra Computer Centre

History Of C The milestones in C's development as a language are listed below:• UNIX developed c. 1969 -- DEC PDP-7 Assembly Language

• BCPL -- a user friendly OS providing powerful development tools developed from BCPL. Assembler tedious long and error prone.

• A new language ``B'' a second attempt. c. 1970.• A totally new language ``C'' a successor to ``B''. c. 1971• By 1973 UNIX OS almost totally written in ``C''.

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 4: 45 Days C Language Training In Ambala! Batra Computer Centre

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 5: 45 Days C Language Training In Ambala! Batra Computer Centre

Characteristics of C We briefly list some of C's characteristics that define the language.• Small size• Extensive use of function calls• Loose typing -- unlike PASCAL• Structured language• Low level (Bitwise) programming readily available• Pointer implementation - extensive use of pointers for memory, array, structures and functions.

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 6: 45 Days C Language Training In Ambala! Batra Computer Centre

Reasons for Being A Professional Language

C has now become a widely used professional language for various reasons.• It has high-level constructs.• It can handle low-level activities.• It produces efficient programs.• It can be compiled on a variety of computers.

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 7: 45 Days C Language Training In Ambala! Batra Computer Centre

Structure of a C Program

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 8: 45 Days C Language Training In Ambala! Batra Computer Centre

Simple C ProgramEmail Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 9: 45 Days C Language Training In Ambala! Batra Computer Centre

Variables In CC variable is a named location in a memory where a program can manipulate the data. This location is used to hold the value of the variable. The value of the C variable may get changed in the program.

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 10: 45 Days C Language Training In Ambala! Batra Computer Centre

Constants In C ANSI C allows you to declare constants. When you declare a constant it is a bit like a variable declaration except the value cannot be changed.

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 11: 45 Days C Language Training In Ambala! Batra Computer Centre

Data Types In C

C has a concept of 'data types' which are used to define a variable before its use. The definition of a variable will assign storage for the variable and define the type of data that will be held in the location.

The value of a variable can be changed any time.

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 12: 45 Days C Language Training In Ambala! Batra Computer Centre

Different Data Types in C• C has the following basic built-in data types.• int• float• double• char

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 13: 45 Days C Language Training In Ambala! Batra Computer Centre

Operators in CAn operator is a symbol that tells the compiler to perform specific mathematical or logical functions. C language is rich in built-in operators and provides the following types of operators −• Arithmetic Operators• Relational Operators• Logical Operators• Bitwise Operators• Assignment Operators• Misc Operators

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 14: 45 Days C Language Training In Ambala! Batra Computer Centre

Operators Precedence in CEmail Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 15: 45 Days C Language Training In Ambala! Batra Computer Centre

Control Statements In CA control statement is a statement that determines whether other statements will be executed. An if statement decides whether to execute another statement, or decides which of two statements to execute. A loop decides how many times to execute another statement. C provides two styles of flow control:• Branching• Looping

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 16: 45 Days C Language Training In Ambala! Batra Computer Centre

1. BranchingBranching is so called because the program chooses to follow one branch or another. Branching is deciding what actions to take.• If Statement• If Else Statement• Switch Statement

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 17: 45 Days C Language Training In Ambala! Batra Computer Centre

2. LoopingLoops provide a way to repeat commands and control how many times they are repeated. C provides a number of looping way. looping is deciding how many times to take a certain action.• For Loop• While Loop • Do While Loop

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 18: 45 Days C Language Training In Ambala! Batra Computer Centre

Functions in CA function is a group of statements that together perform a task. Every C program has at least one function, which is main(), and all the most trivial programs can define additional functions.

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 19: 45 Days C Language Training In Ambala! Batra Computer Centre

Array in CArrays a kind of data structure that can store a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 20: 45 Days C Language Training In Ambala! Batra Computer Centre

Strings In CStrings are actually one-dimensional array of characters terminated by a null character '\0'. Thus a null-terminated string contains the characters that comprise the string followed by a null.

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 21: 45 Days C Language Training In Ambala! Batra Computer Centre

Pointers in CA pointer is a variable whose value is the address of another variable, i.e., direct address of the memory location.

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 22: 45 Days C Language Training In Ambala! Batra Computer Centre

Structures in C• Arrays allow to define type of variables that

can hold several data items of the same kind. Similarly structure is another user defined data type available in C that allows to combine data items of different kinds.

• Structures are used to represent a record. Suppose you want to keep track of your books in a library.

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 23: 45 Days C Language Training In Ambala! Batra Computer Centre

Unions In CA union is a special data type available in C that allows to store different data types in the same memory location. You can define a union with many members, but only one member can contain a value at any given time. Unions provide an efficient way of using the same memory location for multiple-purpose.

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 24: 45 Days C Language Training In Ambala! Batra Computer Centre

Programming Language ‘C’

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Email Id: [email protected]

Page 25: 45 Days C Language Training In Ambala! Batra Computer Centre

Programming Language C

Introduction Control Statements Functions Arrays Strings Pointers Structure Union

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 26: 45 Days C Language Training In Ambala! Batra Computer Centre

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

BATRA COMPUTER CENTREISO CERTIFIED

Page 27: 45 Days C Language Training In Ambala! Batra Computer Centre

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 28: 45 Days C Language Training In Ambala! Batra Computer Centre

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

ADDRESS: SCO-15 Dayal Bagh, Ambala Cantt 133001 Near Panchmukhi Hanuman Mandir Haryana.Ph. No. : 9729666670, 4000670E-Mail ID : [email protected] : www.batracomputercentre.com

Page 29: 45 Days C Language Training In Ambala! Batra Computer Centre

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670

Page 30: 45 Days C Language Training In Ambala! Batra Computer Centre

Email Id: [email protected]

Website:www.batracomputercentre.com Ph. No.: 4000670, 9729666670