Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
13 views

C Programming History

Uploaded by

Charles Ilao
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

C Programming History

Uploaded by

Charles Ilao
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

1

SeminarPpt.com

Seminar
On
C
Programming

SUBMITTEDTO: SUBMITTED BY
SEMINARPPT.COM SEMINARPPT.COM
2

TABLE OF CONTENTS
1. Introduction to C
2. History of C
3. Features of C
4. Structure of a C Program
5. Basic Syntax
6. Data Types,Variables, and Operators
7. Control Statements
8. Applications of C
9. Conclusion
3

INTRODUCTION
TO C
W ha t i s C
prog ra m m ing ?

▪ Definition: C is a high-level,
general-purpose programming
language that provides low-level
access to memory and system
processes.

▪ Designed for system programming,


it is widely used for developing
operating systems.
4

HISTORY OF
C
❑Origin: Developed by Dennis Ritchie at
Bell Labs in 1972.

❑Influences: Based on the B programming


language and influenced by ALGOL.

❑Evolution:

• K&R C: The original version described in


"The C Programming Language" book by
Kernighan and Ritchie.

• ANSI C: Standardized version by ANSI in


1989.

• ISO C: Further standardized by ISO in


1990.
5

FEATURES OF
C
❑Simplicity: Simple syntax and
easy to learn.

❑Efficiency: Produces highly


efficient programs.

❑Portability: Code can run on


different machines with little or no
modification.

❑Rich Library: Provides a rich set


of built-in functions.
6
7

STRUCTURE OF C

❑Header Files: Include


❑ Statements and
necessary libraries (e.g.,
Expressions: Perform
#include <stdio.h>).
operations and control
❑Main Function: Entry program flow.
point of the program (int ❑ Return Functions:
main()). Define reusable code
❑Variable Declarations: blocks.
Declare variables to store
data
8

#include <stdio.h> // Preprocessor


directive BASIC SYNTAX
❑Preprocessor Directive:
// Function declaration
✓#include <stdio.h>: This line includes
int main() {
// Variable declaration the Standard Input Output library,
int a; which allows the use of functions like
printf.
// Initialization
MARGIE'S TRAVEL

❑Function Declaration:
a = 10;
✓int main() : This line declares the
// Function call main function, which is the entry
printf("Value of a is %d\n", a); point of any C program.

// Return statement ❑Variable Declaration:

return 0; ✓int a; : This line declares an integer


M } variable a.
9

#include <stdio.h> // Preprocessor


directive
BASIC SYNTAX
❑Initialization::
// Function declaration
int main() { ✓a = 10;: This line initializes the
// Variable declaration variable a with the value 10.
int a;
❑Return Statement:
// Initialization ✓return 0;: This line returns 0,
a = 10;
indicating that the program has

// Function call been executed successfully.


printf("Value of a is %d\n", a); ❑Closing Bracket:

// Return statement ✓}: This line marks the end of the


return 0; main function.
}
10

DATA TYPES,VARIABLES,AND
OPERATORS

Data Types Variables

❑int: Integer • int age;


❑float: Floating-point • float salary;
number • char initial;
❑double: Double-precision
floating-point number
❑char: Character
11

Operators

❑ A ri th me ti c Ope ra t or s : +, - , * ,
/, %
❑ R el a ti on a l Op er at o rs : == , != ,
>, < , >=, <=
❑ Log ic a l O pe ra to r s : && , | |, !
❑ A s s ig nme nt O per a to r s : =, + =,
- =, * =, / =, % =
❑ In c rem ent / De c rem ent
Op er a to rs : ++ , - -
12

CONTROL STATEMENTS

If Statement: If-Else Statement:

if (condition) { if (condition) {
// code // code
MARGIE'S TRAVEL

} } else {
❑The if statement executes // code
a block of code if a }
specified condition is true. ❑The if-else statement
executes one block of
code if the condition is
true, and another block if
the condition is false.
13

CONTROL STATEMENTS

Switch Statement:
switch (variable) {
case value1: ❑The switch statement
// code executes one of many
break; blocks of code based on
the value of a variable.
case value2:
// code
break;
default:
// code
}
14

CONTROL STATEMENTS

For Loop: While loop:

for (initialization; condition; while (condition) {


increment) { // code
// code }
} ❑The while loop repeats a
❑The for loop repeats a block of code as long as a
block of code a specific specified condition is
number of times. true.
15

CONTROL STATEMENTS

Do - w hi le l o op :
❑ T h e d o- wh i l e
l o op i s s i mi l a r t o
th e wh i l e l oop , do {
b u t i t e xe cu te s // code to be executed
th e b l ock of co de
a t l e a s t on ce } while (condition);
b e fo re c h ec ki n g
th e con d i ti o n .
16

APPLICATIONS
OF C
❑Operating Systems: Unix, Linux,
Windows

❑Compilers: GCC, Clang

❑Embedded Systems:
Microcontrollers, IoT devices

❑Game Development: Game


engines, graphics programming

❑Database Systems: MySQL,


Oracle
17

CONCLUSION

Summary: C programming is a foundational language that offers


simplicity, efficiency, andcflexibility,
programming making it suitable for a wide
range of applications.
18

REFERENCES

• Wikipedia.org
• Google.com
• Seminarppt.com
• Studymafia.org
19

You might also like