C Programming Language PPT: Introduction, History, Applications
C language is a powerful and versatile programming language that has been around since the 1970s. Created by Dennis Ritchie, it is known for its efficiency and control over system resources. C is widely used for developing operating systems, embedded systems, and high-performance applications.
Also See: SQL PPT Free: Introduction Statements and Advantages
It provides a solid foundation for learning other programming languages, thanks to its straightforward syntax and structure. Key features include low-level memory access, a rich set of operators, and the ability to manipulate bits and bytes. Despite its age, C remains popular due to its speed, portability, and the vast number of libraries and tools available.
Also See: Software Testing PPT Free: History, Types and Benefits
Table of Content for C Programming Language PPT
- Introduction to C
- History of C
- Features of C
- Structure of a C Program
- Basic Syntax
- Data Types, Variables, and Operators
- Control Statements
- Applications of C
Free Download Link
C Programming PPT
Related posts:
Leave a Comment Cancel reply
Save my name, email, and website in this browser for the next time I comment.
- Collections
- Introduction To C Programming Language PPT
Introduction to C Programming Language PPT and Google Slides
Introduction To C Programming Language Presentation Slide
C is a high-level programming language that was originally developed in the early 1970s for system programming and has since become widely used for a variety of applications. It is a procedural language that allows for structured programming and modular design, making it highly flexible and efficient. C has a rich set of built-in functions and operators, and allows for low-level memory manipulation, making it ideal for applications that require high performance and speed. It has also been widely adopted in the field of embedded systems and microcontrollers. C continues to be an important language for software development today. By using our template, you can convey your message in a clear and concise manner.
Features of the template:
- 100% customizable slides and easy to download.
- Easy to change the slide's colors.
- The slide contained 16:9 and 4:3 format.
- Highly compatible with PowerPoint and Google Slides.
- Content ready slides with colorful visuals.
- Programming
- Programming Language
- Software Design And Coding
- Coding Language
- Coder Programming
- C Programming Language
- Introduction To C Programming
- Google Slides
324+ Templates
1617+ Templates
Artificial Intelligence
220+ Templates
136+ Templates
47+ Templates
Cloud computing
185+ Templates
Cyber security
263+ Templates
Mobile Phones
221+ Templates
26+ Templates
67+ Templates
You May Also Like These PowerPoint Templates
- My presentations
Auth with social network:
Download presentation
We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Chapter 2 - Introduction to C Programming
Published by Ambrose Norris Modified over 6 years ago
Similar presentations
Presentation on theme: "Chapter 2 - Introduction to C Programming"— Presentation transcript:
Lecture 2 Introduction to C Programming
Introduction to C Programming
CS 6301 Lecture 2: First Program1. CS Topics of this lecture Introduce first program Explore inputs and outputs of a program Arithmetic using.
2005 Pearson Education, Inc. All rights reserved Introduction.
1 Chapter 2 Introduction to Java Applications Introduction Java application programming Display ____________________ Obtain information from the.
2007 Pearson Education, Inc. All rights reserved Introduction to C Programming.
Chapter 2 Introduction to C Programming
2000 Prentice Hall, Inc. All rights reserved. Chapter 2 - Introduction to C Programming Outline 2.1Introduction 2.2A Simple C Program: Printing a Line.
CMT Programming Software Applications
Chapter 2 Introduction to C Programming Associate Prof. Yuh-Shyan Chen Dept. of Computer Science and Information Engineering National Chung-Cheng University.
2003 Prentice Hall, Inc. All rights reserved. 1 Introduction to C++ Programming Outline Introduction to C++ Programming A Simple Program: Printing a.
C How to Program, 6/e © by Pearson Education, Inc. All Rights Reserved.
C How to Program, 7/e © by Pearson Education, Inc. All Rights Reserved.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 2 Chapter 2 - Introduction to C Programming.
Introduction to C Programming Angela Chih-Wei Tang ( 唐 之 瑋 ) Department of Communication Engineering National Central University JhongLi, Taiwan 2010 Fall.
Week 1 Algorithmization and Programming Languages.
About project
© 2024 SlidePlayer.com Inc. All rights reserved.
- Preferences
Chapter 3: Introduction to C Programming Language - PowerPoint PPT Presentation
Chapter 3: Introduction to C Programming Language
Chapter 3: introduction to c programming language c development environment a simple program example characters and tokens structure of a c program – powerpoint ppt presentation.
- C development environment
- A simple program example
- Characters and tokens
- Structure of a C program
- comment and preprocessor directives
- basic data types
- data declarations
- Basic functions
- NOTE ABOUT C PROGRAMS
- In C, lowercase and uppercase characters are very important! All commands in C must be lowercase. The C programs starting point is identified by the word
- This informs the computer as to where the program actually starts. The brackets that follow the keyword main indicate that there are no arguments supplied to this program (this will be examined later on).
- The two braces, and , signify the begin and end segments of the program.
- Summary of major points so far
- program execution begins at main()
- keywords are written in lower-case
- statements are terminated with a semi-colon
- text strings are enclosed in double quotes
- Characters are the basic building blocks in C program, equivalent to letters in English language
- Includes every printable character on the standard English language keyboard except , and _at_
- Example of characters
- Numeric digits 0 - 9
- Lowercase/uppercase letters a - z and A - Z
- Space (blank)
- Special characters , . ? / ( ) lt gt etc
- A token is a language element that can be used in forming higher level language constructs
- Equivalent to a word in English language
- Several types of tokens can be used to build a higher level C language construct such as expressions and statements
- There are 6 kinds of tokens in C
- Reserved words (keywords)
- Identifiers
- String literals
- Punctuators
- Keywords that identify language entities such as statements, data types, language attributes, etc.
- Have special meaning to the compiler, cannot be used as identifiers in our program.
- Should be typed in lowercase.
- Example const, double, int, main, void, while, for, else (etc..)
- Words used to represent certain program entities (program variables, function names, etc).
- int my_name
- my_name is an identifier used as a program variable
- void CalculateTotal(int value)
- CalculateTotal is an identifier used as a function name
- Entities that appear in the program code as fixed values.
- 4 types of constants
- Integer constants
- Positive or negative whole numbers with no fractional part
- const int MAX_NUM 10
- const int MIN_NUM -90
- Floating-point constants
- Positive or negative decimal numbers with an integer part, a decimal point and a fractional part
- const double VAL 0.5877e2 (stands for 0.5877 x 102)
- Character constants
- A character enclosed in a single quotation mark
- const char letter n
- const char number 1
- printf(c, S)
- Output would be S
- Enumeration
- Values are given as a list
- A sequence of any number of characters surrounded by double quotation marks.
- My name is Salman
- Example of usage in C program
- printf(My room number is BN-1-012\n)
- Output My room number is BN-1-012
- Symbols used to separate different parts of the C program.
- These punctuators include
- Usage example
- Tokens that result in some kind of computation or action when applied to variables or or other elements in an expression.
- Example of operators
- result total1 total2
- Explanations or annotations that are included in a program for documentation and clarification purpose.
- Completely ignored by the compiler during compilation and have no effect on program execution.
- Starts with / and ends with /
- Some compiler support comments starting with //
- The first thing to be checked by the compiler.
- Starts with .
- Tell the compiler about specific options that it needs to be aware of during compilation.
- There are a few compiler directives. But only 2 of them will be discussed here.
- include ltstdio.hgt
- Tell the compiler to include the file stdio.h during compilation
- Anything in the header file is considered a part of the program
- define VALUE 10
- Tell the compiler to substitute the word VALUE with 10 during compilation
- 3 examples of basic data types
- int (used to declare numeric program variables of integer type)
- char (used to declare character variable)
- double (used to declare floating point variable)
- In addition, there are float, void, short, long, etc.
- Declaration specifies the type of a variable.
- Example int local_var
- Definition assigning a value to the declared variable.
- Example local_var 5
- A variable can be declared globally or locally.
- A globally declared variable can be accessed from all parts of the program.
- A locally declared variable can only be accessed from inside the function in which the variable is declared.
- A specification of an action to be taken by the computer as the program executes.
- In the previous example, there are 2 lines following variable declaration and variable definition that terminate with semicolon .
- global_var local_var VALUE
- printf (Total sum is d\n, global_var)
- Each line is a statement.
- A C program consists of one or more functions that contain a group of statements which perform a specific task.
- A C program must at least have one function the function main.
- We can create our own function or use the functions that has been created in the library, in which case we have to include the appropriate header file (example stdio.h).
- In this section, we will learn a few functions that are pre-defined in the header file stdio.h
- These functions are
- getchar() putchar()
- In addition to those functions, we will also learn about Format Specifier and Escape Sequence which are used with printf() and scanf().
- Used to send data to the standard output (usually the monitor) to be printed according to specific format.
- General format
- printf(control string, variables)
- Control string is a combination of text, format specifier and escape sequence.
- printf(Thank you)
- d is a format specifier
- \n is an escape sequence
- Read data from the standard input device (usually keyboard) and store it in a variable.
- scanf(Control string, variable)
- The general format is pretty much the same as printf() except that it passes the address of the variable (notice the sign) instead of the variable itself to the second function argument.
- getchar() - read a character from standard input
- putchar() - write a character to standard output
PowerShow.com is a leading presentation sharing website. It has millions of presentations already uploaded and available with 1,000s more being uploaded by its users every day. Whatever your area of interest, here you’ll be able to find and view presentations you’ll love and possibly download. And, best of all, it is completely free and easy to use.
You might even have a presentation you’d like to share with others. If so, just upload it to PowerShow.com. We’ll convert it to an HTML5 slideshow that includes all the media types you’ve already added: audio, video, music, pictures, animations and transition effects. Then you can share it with your target audience as well as PowerShow.com’s millions of monthly visitors. And, again, it’s all free.
About the Developers
PowerShow.com is brought to you by CrystalGraphics , the award-winning developer and market-leading publisher of rich-media enhancement products for presentations. Our product offerings include millions of PowerPoint templates, diagrams, animated 3D characters and more.
Basics of C language
Apr 02, 2019
190 likes | 360 Views
Basics of C language. Contents. Introduction Strengths & Weakness of C Language Character Set Keywords Identifiers Variables Constants Data Types . Introduction. C is a general-purpose high level language that was developed by Dennis Ritchie . Features of C language are :
Share Presentation
- keyword int
- high level language
- double quotation mark
Presentation Transcript
Contents • Introduction • Strengths & Weakness of C Language • Character Set • Keywords • Identifiers • Variables • Constants • Data Types
Introduction C is a general-purpose high level language that was developed by Dennis Ritchie . Features of C language are : • Easy to learn. • Structured language. • It produces efficient programs. • It can handle low-level activities. • It can be compiled on a variety of computers. Back
Strengths & Weakness of C Language Strengths of C Language: • Efficiency • Portability • Power • Flexibility • Standard Library Weakness of C Language: • Error Prone • Difficult to understand • Difficult to modify Back
Character Set C does not use, nor requires the use of, every character found on a modern computer keyboard. The only characters required by the C Programming Language are as follows: • Uppercase: A B C .................................... X Y Z • Lowercase: a b c ...................................... x y z • Digits: 0 1 2 3 4 5 6 8 9 - • Special Characters: <>._();$:%[]#?'&{}"^!*/|-\~+ • White space Characters: blank space, new line, horizontal tab, carriage return and form feed Back
Keywords Keywords are the reserved words used in programming. Each keywords has fixed meaning and that cannot be changed by use. auto double int struct break else long switch case enum register typedef char extern return union const float short unsigned continue for signed void default goto sizeof volatile do if static while Back
Identifiers In C programming, identifiers are names given to C entities, such as variables, functions, structures etc. Identifier are created to give unique name to C entities to identify it during the execution of program. For example: int money; Here, money is a identifier which denotes a variable of type integer. Rules for writing identifier • An identifier can be composed of letters (both uppercase and lowercase letters), digits and underscore '_' only. • The first letter of identifier should be either a letter or an underscore. But, it is discouraged to start an identifier name with an underscore though it is legal. It is because, identifier that starts with underscore can conflict with system names. In such cases, compiler will complain about it. Some system names that start with underscore are _fileno, _iob, _wfopen etc. • There is no rule for the length of an identifier. However, the first 31 characters of an identifier are discriminated by the compiler. So, the first 31 letters of two identifiers in a program should be different Back
Variables Variables are memory location in computer's memory to store data. To indicate the memory location, each variable should be given a unique name called identifier. Variable names are just the symbolic representation of a memory location. Examples : sum ,add. Rules for writing variable name in C • Variable name can be composed of letters (both uppercase and lowercase letters), digits and underscore '_' only. • The first letter of a variable should be either a letter or an underscore. But, it is discouraged to start variable name with an underscore though it is legal. It is because, variable name that starts with underscore can conflict with system names and compiler may complain. • There is no rule for the length of length of a variable. However, the first 31 characters of a variable are discriminated by the compiler. So, the first 31 letters of two variables in a program should be different. Back
Constants Constants are the terms that can't be changed during the execution of a program. For example: 1, 2.5, "Programming is easy." etc. Constants can be classified as: • Integer constants: Integer constants are the numeric constants without any fractional part or exponential part. There are three types of integer constants in C language: decimal constant(base 10), octal constant(base 8) and hexadecimal constant(base 16) . Decimal constants: 0, -9, 22 etc Octal constants: 021, 077, 033 etc Hexadecimal constants: 0x7f, 0x2a, 0x521 etc . • Floating-point constants : Floating point constants are the numeric constants that has either fractional form or exponent form. For example: -2.0 , 0.0000234 , -0.22E-5 • Character constants: Character constants are the constant which use single quotation around characters. For example: 'a', 'l', 'm', 'F' etc.
String constants:String constants are the constants which are enclosed in a pair of double-quote marks. • "good“ //string constant • “ " //null string constant • “ " //string constant of six white space • "x“ //string constant having single character. • "Earth is round\n" //prints string with newline • Escape Sequences: Sometimes, it is necessary to use newline(enter), quotation mark etc. in the program which either cannot be typed or has special meaning in C programming. Escape SequencesCharacter \b Backspace \f Form feed \n Newline \r Return \‘ Single quotation mark \" Double quotation mark Back
Data Types In C, variable(data) should be declared before it can be used in program. Data types are the keywords, which are used for assigning a type to a variable. • Data types in C: Fundamental Data TypesDerived Data Types Integer types Arrays Floating Type Pointers Character types Structures Enumeration • Syntax for declaration of a variable: data_type variable name; • Integer data types: Keyword int is used for declaring the variable with integer type. For example : int var1;
Basic Integer Types
Floating Data Types: Variables of floating types can hold real values(numbers) such as: 2.34, -9.382 etc. Keywords either float or double is used for declaring floating type variable. • float single-precision floating-point • double double-precision floating-point • long double extended-precision floating-point
Character types : Keyword char is used for declaring the variable of character type. For example: char var4='h'; Here, var4 is a variable of type character which is storing a character 'h'. The size of char is 1 byte. The character data type consists of ASCII characters. Each character is given a specific value. For example: For, 'a', value =97 For, 'b', value=98 For, 'A', value=65 For, '&', value=33 For, '2', value=49 Back
- More by User
C Basics. The C Language Spirit. Made by professional programmers for professional programmers Very flexible, very efficient, very liberal Does not protect the programmers from themselves.
737 views • 47 slides
C# Basics. Variables, Loops, Decision Statements, etc. byte - 0 to 255 char - 2 bytes bool sbyte - -128 to 127 short - 2 byte int ushort - 0 to 65,535 int - 4 bytes uint - 4 bytes positive. float double decimal long ulong string. Variables Declarations. Using Variables.
241 views • 8 slides
Basics of C Programming
Basics of C Programming. UNIT-I. Basic Terminologies. Computers -really dumb machines because they do only what we are told to do. A computer program - is just a collection of the instructions necessary to solve a specific problem.
1.72k views • 146 slides
C++ Basics. Brian Malloy, PhD Department of Computer Science Clemson University Clemson SC, USA. C++ Overview. Designed by B. Stroustrup (1986), C++ and ANSI C Hybrid language: OO and ‘conventional’ programming, More than just an OO version of C operator overloading templates.
1.17k views • 98 slides
Review of C++ Basics
Review of C++ Basics . Problem Solving With Arrays & Functions. Write a program that will read data, sum the numbers, compute the average and find the maximum value Read data from the console Read data from a file. Program. /* Program to process exam grades */ #include <iostream>
111 views • 9 slides
The Basics of Plain Language
The Basics of Plain Language. Purpose. The purpose of this lesson is to introduce the principles of plain language. . Contents. What Is Plain Language? Know Your Reader Reading Skills Matching Texts with Reading Skills. 1. What is Plain Language?.
781 views • 52 slides
C# Basics. Course Introduction. Svetlin Nakov. Technical Trainer. www.nakov.com. Software University. http:// softuni.bg. Table of Contents. Course Objectives Course Program Trainers Team Examination Learning Resources. C# Basics. C# Basics Course. Course Objectives & Program.
848 views • 35 slides
C++ Basics. Prof. Shermane Austin. Learning Programming Language Basics. Data Types – simple Expressions Relational and Logical Operators Conditional Statements Arrays Iteration Memory Allocation I/O Functions. Hello World . //Simple C++ program
389 views • 29 slides
The Basics of Language Acquisition
The Basics of Language Acquisition. Applying them in the classroom and sharing them with others. Introductions. Tabitha Kidwell, M.A. Foreign and Second Language Education, The Ohio State University How about you? Who is… …teaching at the primary/secondary/tertiary level?
418 views • 21 slides
Basics of C
Basics of C. Session 1. Objectives. Differentiate between Command, Program and Software Explain the beginning of C Explain when and why is C used Discuss the C program structure Discuss algorithms Draw flowcharts List the symbols used in flowcharts. Software. Program 2. Program 1.
467 views • 26 slides
C++ Basics. Joaquin Vila. For Thursday. Read Savitch 2.2-2.3 Do practice problems. Quiz. Origins of C++. BCPL B Ken Thomson (Creator of UNIX) C Dennis Ritchie, AT&T Bell Laboratories, 1970s. The Origins of C++. C++ Bjarne Stroustrup AT&T Bell Laboratories, 1980s.
425 views • 34 slides
C/C++ Basics
C/C++ Basics. Basic Concepts. Basic functions of each language: Input, output, math, decision, repetition Types of errors: Syntax errors, logic errors, runtime errors. Debugging Machine language, assembly language, high level languages. Procedural Programming. Data Element. Procedure B.
507 views • 27 slides
Basics of C programming
Basics of C programming . C programming language KICaPasarsresrkmµ viFImYyEdlmanGnuPaB nig PaBrsrevIkx<s;;. ral;BaküKnøwsTaMgGs; RtUv)anbMElgeTACaPasar Machine eRkayeBl Compile. Basics of C programming .
252 views • 5 slides
Java Language Basics
Java Language Basics. Shawn Mandik. Program Structure. Basic structure: public class ClassName { public static void main(String[] args) { program statements } user defined methods }. Class Notes. “public” classes and methods can be called from any class
1.07k views • 10 slides
This Is the Short Description About the Basics Concepts Of C Programming.. It will Give you a Basic Concept of how to implement a code ...
407 views • 37 slides
C++ Programming Language Lecture 4 C++ Basics – Part II
C++ Programming Language Lecture 4 C++ Basics – Part II. By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department. Outline. Arithmetic operators. Logical operators. Assignment operator. Increment and decrement operators. Bitwise Operators. Relational Operators.
469 views • 43 slides
C++ Basics. Csci 107 Lecture 8. A C++ program. //if necessary include headers //#include <foo.h> void main() { //variable declaration //read values input from user //computation //print output to user } Notes: what follows after // on the same line is considered comment
155 views • 14 slides
Programming. C++ Basics. Introduction to C++. C++ is a programming language for manipulating numbers and user-defined objects. C++ is a cross between the programming languages C and Smalltalk. Smalltalk (objects). C (numbers). Shell programming (text).
420 views • 41 slides
C++ Basics. Variables, Identifiers, Assignments, Input/Output. 1001. 1002. y. 12.5. 1003. 1004. 1005. Temperature. 32. 1006. Letter. 'c'. 1007. 1008. -. Number. 1009. Variables.
145 views • 13 slides
669 views • 64 slides
CULTURE BASICS Language
CULTURE BASICS Language. AP HG SRMHS Mr. Hensley. Communication versus Language. Communication is the transmission of signals Language is a subset of communication Language is made up of rules that we use to combine words into for an unlimited variety of meanings.
232 views • 21 slides
IMAGES
VIDEO
COMMENTS
C language is a powerful and versatile programming language that has been around since the 1970s. Created by Dennis Ritchie, it is known for its efficiency and control over system resources. C is widely used for developing operating systems, embedded systems, and high-performance applications. Also See: SQL PPT Free: Introduction Statements and ...
Introduction to C Programming Language Mr.Mohamed EL.Saied. History of C C was evolved by Dennis Ritchie at AT&T Bell Laboratories in early of 1970s Successor of: ALGOL 60 (1960), CPL (Cambridge, 1963), BCPL (Martin Richard, 1967), B (Ken Thompson, 1970) Used to develop UNIX. Traditional C: The C Programming Language, by Brian Kernighan and ...
Special Symbols Operators Character & String. 3 1. Keywords Keywords are the reserved words whose meaning has already been explained to the C compiler. C has 32 keywords. These keywords combined with a formal syntax form a C programming language. Rules to be followed for all programs written in C: All keywords are lower-cased.
Presentation Transcript. Chapter 1 Introduction to C Language By C. Shing ITEC Dept Radford University. Objectives • Understand brief history of C • Describe C components • Understand C features • Understand Program Structure in C • Understand how to run a C program using GNU C compiler and in .NET environment • Understand how to ...
Introduction to the C Programming Language Fred Kuhns [email protected] Applied Research Laboratory, Department of Computer Science and Engineering, Washington University in St. Louis. Introduction • The C programming language was designed by Dennis Ritchie at Bell Laboratories in the early 1970s • Influenced by • ALGOL 60 (1960 ...
Introduction To C Programming Language Presentation Slide. C is a high-level programming language that was originally developed in the early 1970s for system programming and has since become widely used for a variety of applications. It is a procedural language that allows for structured programming and modular design, making More...
Download ppt "Chapter 2 - Introduction to C Programming". In this chapter, you will learn: Objectives In this chapter, you will learn: To be able to write simple computer programs in C. To be able to use simple input and output statements. To become familiar with fundamental data types. To understand computer memory concepts.
Chapter 3: Introduction to C Programming Language C development environment A simple program example Characters and tokens Structure of a C program – A free PowerPoint PPT presentation (displayed as an HTML5 slide show) on PowerShow.com - id: 40f384-ZmM2M
Cp Sc 1110 - Programming in C 4th Edition. Slides and Handouts. Chapter. Slides. Handouts. 01 Introduction to C. Slides. Handouts. 02 Your First Program.
Presentation Transcript. Basics of C language. Contents • Introduction • Strengths & Weakness of C Language • Character Set • Keywords • Identifiers • Variables • Constants • Data Types. Introduction C is a general-purpose high level language that was developed by Dennis Ritchie . Features of C language are : • Easy to learn.