This document provides an introduction to the C programming language. It discusses C's history, why it is useful, and the basics of C programming. C was created in the early 1970s and became widely popular due to its ability to produce efficient, portable code. It discusses C's roots in earlier languages like B and BCPL. The document also covers C standard libraries, basic C programs and syntax, variables, operators, and decision making in C.
Introduction to C Programming
Content :
Introduction
-Types of programming language
-Machine Language
-Assembly Language
-High Level Language
Introduction to C programming
-Basic Structure of C Program
-Simple program in C programming
You can get more from our website:
www.programmingcampus.com
C Programming
History of C Programming
Features of C Programming
More about C Programming
Advantages of C Programming
Disadvantages of C Programming
Write using C programming
C is mother language of all programming language.
It is a system programming language. It is a procedure-oriented programming language. It is also called mid-level programming language.
C evolved from a language called B, written by Ken Thompson at Bell Labs in 1970. Ken used B to write one of the first implementations of UNIX. B in turn was a descendant of the language BCPL (developed at Cambridge (UK) in 1967), with most of its instructions removed.
So many instructions were removed in going from BCPL to B, that Dennis Ritchie of Bell Labs put some back in (in 1972), and called the language C.
The famous book The C Programming Language was written by Kernighan and Ritchie in 1978, and was the definitive reference book on C for almost a decade.
The original C was still too limiting, and not standardized, and so in 1983, an ANSI committee was established to formalize the language definition.
It has taken until now (ten years later) for the ANSI ( American National Standard Institute) standard to become well accepted and almost universally supported by compilers.
At the end of this lecture students should be able to;
Describe features of C programming language.
Justify the terminology related to computer programming.
Define the editing, compiling, linking, debugging stages of C programming
Recognize the basic structure of a C program
Apply comments for C programs to improve readability.
Introduction to C Programming
Content :
Introduction
-Types of programming language
-Machine Language
-Assembly Language
-High Level Language
Introduction to C programming
-Basic Structure of C Program
-Simple program in C programming
You can get more from our website:
www.programmingcampus.com
C Programming
History of C Programming
Features of C Programming
More about C Programming
Advantages of C Programming
Disadvantages of C Programming
Write using C programming
C is mother language of all programming language.
It is a system programming language. It is a procedure-oriented programming language. It is also called mid-level programming language.
C evolved from a language called B, written by Ken Thompson at Bell Labs in 1970. Ken used B to write one of the first implementations of UNIX. B in turn was a descendant of the language BCPL (developed at Cambridge (UK) in 1967), with most of its instructions removed.
So many instructions were removed in going from BCPL to B, that Dennis Ritchie of Bell Labs put some back in (in 1972), and called the language C.
The famous book The C Programming Language was written by Kernighan and Ritchie in 1978, and was the definitive reference book on C for almost a decade.
The original C was still too limiting, and not standardized, and so in 1983, an ANSI committee was established to formalize the language definition.
It has taken until now (ten years later) for the ANSI ( American National Standard Institute) standard to become well accepted and almost universally supported by compilers.
At the end of this lecture students should be able to;
Describe features of C programming language.
Justify the terminology related to computer programming.
Define the editing, compiling, linking, debugging stages of C programming
Recognize the basic structure of a C program
Apply comments for C programs to improve readability.
Programming Fundamentals and Programming Languages Concepts Translatorsimtiazalijoono
Programming Fundamentals and Programming Languages Concepts
Translators
Types of Translators
Assembler
Compiler
Simple C Program
Basics of C Environment
Executing a C Program
Executing a C Program
The C is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system.
Understanding C and its Applications.pdfAdeleHansley
It is regarded as a programming foundation for learning any other language. Applications include operating systems and software for supercomputers, PLCs, and embedded devices. If you want help from someone, hire c programming assignment help online services.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
2. Books
s “The Waite Group’s Turbo C Programming for PC”,
Robert Lafore, SAMS
s “C How to Program”, H.M. Deitel, P.J. Deitel,
Prentice Hall
3. What is C?
s C
s A language written by Brian Kernighan
and Dennis Ritchie. This was to be the
language that UNIX was written in to
become the first "portable" language
In recent years C has been used as a general-
purpose language because of its popularity with
programmers.
4. Why use C?
s Mainly because it produces code that runs nearly as fast
as code written in assembly language. Some examples
of the use of C might be:
– Operating Systems
– Language Compilers
– Assemblers
– Text Editors
– Print Spoolers
– Network Drivers
– Modern Programs
– Data Bases
– Language Interpreters
– Utilities
Mainly because of the portability that writing standard C programs can
offer
5. History
s In 1972 Dennis Ritchie at Bell Labs writes C and in
1978 the publication of The C Programming Language
by Kernighan & Ritchie caused a revolution in the
computing world
s In 1983, the American National Standards Institute
(ANSI) established a committee to provide a modern,
comprehensive definition of C. The resulting definition,
the ANSI standard, or "ANSI C", was completed late
1988.
6. Why C Still Useful?
s C provides:
x Efficiency, high performance and high quality s/ws
x flexibility and power
x many high-level and low-level operations middle level
x Stability and small size code
x Provide functionality through rich set of function libraries
x Gateway for other professional languages like C C++ Java
s C is used:
x System software Compilers, Editors, embedded systems
x data compression, graphics and computational geometry, utility
programs
x databases, operating systems, device drivers, system level
routines
x there are zillions of lines of C legacy code
x Also used in application programs
7. Software Development Method
s Requirement Specification
– Problem Definition
s Analysis
– Refine, Generalize, Decompose the problem definition
s Design
– Develop Algorithm
s Implementation
– Write Code
s Verification and Testing
– Test and Debug the code
8. Development with C
s Four stages
Editing: Writing the source code by using some IDE or editor
Preprocessing or libraries: Already available routines
compiling: translates or converts source to object code for a specific
platform source code -> object code
linking: resolves external references and produces the executable
module
Portable programs will run on any machine but…..
Note! Program correctness and robustness are most important
than program efficiency
9. Programming languages
s Various programming languages
s Some understandable directly by computers
s Others require “translation” steps
– Machine language
• Natural language of a particular computer
• Consists of strings of numbers(1s, 0s)
• Instruct computer to perform elementary
operations one at a time
• Machine dependant
10. Programming languages
s Assembly Language
– English like abbreviations
– Translators programs called “Assemblers” to convert
assembly language programs to machine language.
– E.g. add overtime to base pay and store result in gross
pay
LOAD BASEPAY
ADD OVERPAY
STORE GROSSPAY
11. Programming languages
s High-level languages
– To speed up programming even further
– Single statements for accomplishing substantial tasks
– Translator programs called “Compilers” to convert
high-level programs into machine language
– E.g. add overtime to base pay and store result in
gross pay
grossPay = basePay + overtimePay
12. History of C
s Evolved from two previous languages
– BCPL , B
s BCPL (Basic Combined Programming Language) used
for writing OS & compilers
s B used for creating early versions of UNIX OS
s Both were “typeless” languages
s C language evolved from B (Dennis Ritchie – Bell labs)
** Typeless – no datatypes. Every data item occupied 1 word in memory.
13. History of C
s Hardware independent
s Programs portable to most computers
s Dialects of C
– Common C
– ANSI C
• ANSI/ ISO 9899: 1990
• Called American National Standards Institute ANSI C
s Case-sensitive
14. C Standard Library
s Two parts to learning the “C” world
– Learn C itself
– Take advantage of rich collection of existing functions
called C Standard Library
s Avoid reinventing the wheel
s SW reusability
15. Basics of C Environment
s C systems consist of 3 parts
– Environment
– Language
– C Standard Library
s Development environment has 6 phases
– Edit
– Pre-processor
– Compile
– Link
– Load
– Execute
16. Basics of C Environment
Program edited in
Phase 1 Editor Disk Editor and stored
on disk
Preprocessor
Phase 2 Preprocessor Disk program processes
the code
Creates object code
Phase 3 Compiler Disk and stores on disk
Links object code
Phase 4 Linker Disk with libraries and
stores on disk
17. Basics of C Environment
Primary memory
Puts program in
Phase 5 Loader memory
Primary memory
Takes each instruction
Phase 6 CPU and executes it storing
new data values
18. Simple C Program
/* A first C Program*/
#include <stdio.h>
void main()
{
printf("Hello World n");
}
19. Simple C Program
s Line 1: #include <stdio.h>
s As part of compilation, the C compiler runs a program
called the C preprocessor. The preprocessor is able to
add and remove code from your source file.
s In this case, the directive #include tells the
preprocessor to include code from the file stdio.h.
s This file contains declarations for functions that the
program needs to use. A declaration for the printf
function is in this file.
20. Simple C Program
s Line 2: void main()
s This statement declares the main function.
s A C program can contain many functions but must
always have one main function.
s A function is a self-contained module of code that can
accomplish some task.
s Functions are examined later.
s The "void" specifies the return type of main. In this case,
nothing is returned to the operating system.
21. Simple C Program
s Line 3: {
s This opening bracket denotes the start of the program.
22. Simple C Program
s Line 4: printf("Hello World From Aboutn");
s Printf is a function from a standard C library that is used
to print strings to the standard output, normally your
screen.
s The compiler links code from these standard libraries to
the code you have written to produce the final
executable.
s The "n" is a special format modifier that tells the printf
to put a line feed at the end of the line.
s If there were another printf in this program, its string
would print on the next line.
23. Simple C Program
s Line 5: }
s This closing bracket denotes the end of the program.
24. Escape Sequence
s n new line
s t tab
s r carriage return
s a alert
s backslash
s ” double quote
25. Memory concepts
s Every variable has a name, type and value
s Variable names correspond to locations in computer
memory
s New value over-writes the previous value– “Destructive
read-in”
s Value reading called “Non-destructive read-out”
26. Arithmetic in C
C operation Algebraic C
Addition(+) f+7 f+7
Subtraction (-) p-c p-c
Multiplication(*) bm b*m
Division(/) x/y, x , x y x/y
Modulus(%) r mod s r%s
28. Example
Algebra:
z = pr%q+w/x-y
C:
z = p * r % q + w / x – y ;
Precedence:
1 2 4 3 5
29. Example
Algebra:
a(b+c)+ c(d+e)
C:
a * ( b + c ) + c * ( d + e ) ;
Precedence:
3 1 5 4 2
30. Decision Making
s Checking falsity or truth of a statement
s Equality operators have lower precedence than
relational operators
s Relational operators have same precedence
s Both associate from left to right
31. Decision Making
s Equality operators
• ==
• !=
s Relational operators
•<
•>
• <=
• >=
32. Summary of precedence order
Operator Associativity
() left to right
* / % left to right
+ - left to right
< <= > >= left to right
== != left to right
= left to right