The document provides an overview of the C programming language. It discusses the basic building blocks of a computer and how C programming works at a low level. It then covers the basic structure of a C program, including sections for documentation, definitions, global declarations, the main function, and other functions. It also defines key terms like compilers, interpreters, algorithms and flowcharts. Examples are provided to illustrate basic C programs and how they are compiled and executed.
A computer is an electronic device used to process data, converting the data into information that is useful to people.
A computer is a system made of two major components:
hardware and software.
The hardware is the physical equipment.
The software is the collection of programs (instruction) that allow the hardware to do the job.
A computer is an electronic device used to process data, converting the data into information that is useful to people.
A computer is a system made of two major components:
hardware and software.
The hardware is the physical equipment.
The software is the collection of programs (instruction) that allow the hardware to do the job.
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.
Similar to Btech i pic u-1 introduction to c language (20)
Rai University provides high quality education for MSc, Law, Mechanical Engineering, BBA, MSc, Computer Science, Microbiology, Hospital Management, Health Management and IT Engineering.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
The simplified electron and muon model, Oscillating Spacetime: The Foundation...RitikBhardwaj56
Discover the Simplified Electron and Muon Model: A New Wave-Based Approach to Understanding Particles delves into a groundbreaking theory that presents electrons and muons as rotating soliton waves within oscillating spacetime. Geared towards students, researchers, and science buffs, this book breaks down complex ideas into simple explanations. It covers topics such as electron waves, temporal dynamics, and the implications of this model on particle physics. With clear illustrations and easy-to-follow explanations, readers will gain a new outlook on the universe's fundamental nature.
How to Build a Module in Odoo 17 Using the Scaffold MethodCeline George
Odoo provides an option for creating a module by using a single line command. By using this command the user can make a whole structure of a module. It is very easy for a beginner to make a module. There is no need to make each file manually. This slide will show how to create a module using the scaffold method.
Delivering Micro-Credentials in Technical and Vocational Education and TrainingAG2 Design
Explore how micro-credentials are transforming Technical and Vocational Education and Training (TVET) with this comprehensive slide deck. Discover what micro-credentials are, their importance in TVET, the advantages they offer, and the insights from industry experts. Additionally, learn about the top software applications available for creating and managing micro-credentials. This presentation also includes valuable resources and a discussion on the future of these specialised certifications.
For more detailed information on delivering micro-credentials in TVET, visit this https://tvettrainer.com/delivering-micro-credentials-in-tvet/
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
This slide is special for master students (MIBS & MIFB) in UUM. Also useful for readers who are interested in the topic of contemporary Islamic banking.
Normal Labour/ Stages of Labour/ Mechanism of LabourWasim Ak
Normal labor is also termed spontaneous labor, defined as the natural physiological process through which the fetus, placenta, and membranes are expelled from the uterus through the birth canal at term (37 to 42 weeks
2. Function OF Computer
Input -- Input devices enable us to get information into a computer. Some
examples include a keyboard, mouse, microphone, scanner, or digital camera.
Storage -- There are two types of storage: temporary and long-term.
RAM, or random access memory, is temporary, meaning it stores information as
you use it, but it is being constantly erased and rewritten as you open and close
files.
Long-term storage holds information for as long as you want it. Hard drives,
portable hard drives, floppy drives, flash drives, CD’s, and DVD’s are long term
storage devices.
Processor -- A microprocessor controls the computers’ functions. It is smaller
than a dime, but contains millions of transistors that perform millions of
instructions per second. The microprocessor performs these instructions using a
three-step process: fetch, decode and execute.
Output -- Information that has been processed is communicated back to the
user in the form of words, sounds or pictures, and is delivered through printers,
speakers, monitors or other output devices. Sometimes output is just written
back to a storage dev
3. Basic Building Block Of Computer
Control Unit-
this is the device or a part of computer responsible or
performs such regulating functions..
Arithmetic Logic Unit- this is the part or a circuitry of
the Microprocessor chip for arithmetic operations,
proportional and related functions, and logical
functions.
Memory- this is a part of computer or a card or modules
that inserted to the motherboard’s slot
Input -The System Unit that the system of computer
feeds or decode first the data before to display using the
output devices of computer.
Output Devices- this is refer to the devices of
computer that have an ability to display the information
or can produce a hardcopy of a document.
7. What is UNIX?
UNIX is an operating system which was first developed in
the 1960s, and has been under constant development ever
since. By operating system, we mean the suite of programs
which make the computer work. It is a stable, multi-user,
multi-tasking system for servers, desktops and laptops.
UNIX systems also have a graphical user interface (GUI)
similar to Microsoft Windows which provides an easy to
use environment.
However, knowledge of UNIX is required for operations
which aren't covered by a graphical program, or for when
there is no windows interface available, for example, in a
telnet session.
8. Cont..
There are many different versions of UNIX, although
they share common similarities. The most popular
varieties of UNIX are Sun Solaris, GNU/Linux, and
MacOS X.
9. What is LINUX?
It is the software on a computer that enables applications
and the computer operator to access the devices on the
computer to perform desired functions.
Linux is developed collaboratively, meaning no one
company is solely responsible for its development or
ongoing support. Companies participating in the Linux
economy share research and development costs with
their partners and competitors
10. Windows
The operating system gives the framework upon which all
other services and applications run. The majority of home
users use a Windows based machine. Most of today’s
applications and games are designed to run solely on
Microsoft systems.
Microsoft Windows is extremely popular in schools and
colleges, many businesses also use Windows.
The oldest of all Microsoft’s operating systems is MS-DOS
(Microsoft Disk Operating System). MS-DOS is a text-based
operating system. Users have to type commands rather than
use the more friendly graphical user interfaces
(GUI’s)available today
11. What is algorithm?
A method that can be used by a computer for the solution
of a problem.
A sequence of computational steps that transform the
input into the output.
The word ”algorithm” comes from the name of a Persian
author, Abu Ja’far Mohammed ibn Musa al Khowarizmi (c.
825 A.D.), who wrote a textbook on mathematics.
An algorithm (pronounced AL-go-rith-um) is a procedure
or formula for solving a problem.
12. Algorithm
Write an algorithm and draw the flowchart for finding
the average of two numbers Algorithm:
Input: two numbers x and y
Output: the average of x and y
Steps:
input x
input y
sum = x + y
average = sum /2
output average
13. Introduction to flowcharts
A flowchart is a graphical representation of an algorithm.
• Start or end of the program
• Computational steps or processing function of a program
• Input or output operation
• Decision making and branching
• Connector or joining of two parts of program
14. Introduction of ‘C’
Root of the morden language is ALGOL 1960. It’s first computer
language to use a block structure.
It gave concept of structured programming.
In 1967, Martin Richards developed a language, BCPL (Basic
Combined Programming Language)
15. In 1970,by Ken Thompson created a language called as ‘B’.
It used to create early version of Unix.
In 1972,by Dennis Ritchie introduced new language called as ‘C’ .
16. 1972 Traditional C Dennis Ritchie
1990 ANSI/ISO C ISO Committee
1978 K&R C Kernighan &Ritchie
1989 ANSI C ANSI Committee
17. Features Of C
It is robust lang whose rich setup of built in functions and operator can be used to write any
complex prog
Prog written in c are efficient due to severals variety of data types and powerful operators.
The c complier combines the capabilities of an assembly lang with the feature of high level
language. Therefore it is well suited for writing both system software and business package.
There r only 32 keywords, severals standard functions r available which can be used for
developing prog.
c is portable lang , this means that c programes written for one computer system can be run on
another system, with little or no modification.
c lang is well suited for stuctured programming, this requires user to think of a problems in
terms of function or modules or block. A collection of these modules make a program
debugging and testing easier.
c language has its ability to extend itself. A c program is basically a collection of functions that are
supported by the c library. We can contuniously add our own functions to the library with the
avaibility of the large number of functions.
In india and abroad mostly people use c programming lang becoz it is easy to learn and
understand
18. Basic structure of C programming
To write a C program, we first create functions and then put them together. A C program may contain one
or more sections. They are illustrated below.
Documentation section
Link section
Definition section
Global declaration section
main () Function section
{
Declaration part
Executable part
}
Subprogram section
Function 1
Function 2
…………..
…………..
Function n (User defined functions)
19. Basic structure of ‘C’
Documentation Section
It has set of comment lines(name of program, author details).
What is Comment line??
To guide a programmer to write a note for function,operation,logic in
between a program.
Non-executable statement.
Can’t be nested.
e.g:- /* Hello /* abc */ Hi */
ERROR.
20. Link Section
It provides instructions to the compiler to link function from
the system library.
# include Directive:-
To access the functions which are stored in the library, it is
necessary to tell the compiler , about the file to be accessed.
Syntax:-
#include<stdio.h>
stdio.h is header file.
21. Definition Section
defines all symbolic constants.
#define instruction defines value to a symbolic constant.
#define:-
It is a preprocessor compiler directive, not a statement.
Therefore it should not end with a semicolon.
Generally written in uppercase.
22. Global Declaration Section
Some variables that are used in more than on function,
such variables (global variables) declared in the global
declaration section.
It also declares all the user-defined function.
23. Every ‘C’ program must have one main() function section.
It contains two parts
1) Declaration part:
It declares all variables used in the executable part.
2) Executable part:
It has atleast one statement.
Main() function section
24. A simple C program: Printing a line of text
#include <stdio.h>
main()
{
printf(“hello, worldn”);
}
Program output:
hello, world
25. Executing a C program :
Executing a C program involves a series of steps.
They are,
Creating the program.
Compiling the program.
Linking the program with functions that are needed
from the C library.
Executing the program.
26. How to run a program?
There are two ways to run programs written in a high-level
language.
The most common is to Compile the program
The other method is to pass the program through an interpreter.
27. Compiler
Why compiler is require ?
As machine (a processor) can operate On binary code instruction
only…..If we use higher level language then …For execution of the
program we must Convert it to lower level / machine level
Code.
28. Means,
A program that translates Source code into object code.
The compiler derives its name from the way it works, looking
at the entire piece of source code and collecting and
reorganizing the instructions.
29. Interpreter:
which analyzes and executes each line of source code
without looking at the entire program.
Advantage of interpreter:
It can execute a program immediately.
Compilers require some time before an executable program
emerges.
But,
However, programs produced by compilers Run much faster
than the same programs executed by an interpreter.
30. Compiler
checks for syntax errors if any on success coverts ‘C source
code into object code form which is nearer to machine…
33. References:
1. Programming in C by yashwant kanitkar
2. ANSI C by E.balagurusamy- TMG publication
3. Computer programming and Utilization by sanjay shah Mahajan Publication
4. .www.cprogramming.com/books.html
5. en.wikipedia.org/wiki/C_(programming_language)
6. www.programmingsimplified.com/c-program-example
7. http://cm.bell-labs.com/cm/cs/who/dmr/chist.html
8. http://en.wikipedia.org/wiki/Comparison_of_programming_languages
9. http://en.wikipedia.org/wiki/List_of_C-based_programming_languages
10. http://en.wikipedia.org/wiki/C_(programming_language)