0% found this document useful (0 votes)
30 views

Introduction To C Programming

This document provides an introduction to C programming. It discusses the origins of computing from the abacus to modern programming languages like Python and Java. C programming is a high-level, procedural language that uses a compiler to translate code into machine-readable instructions. Learning to program develops problem-solving and logical thinking skills. Integrated development environments help programmers write, build, and debug C programs, providing tools like a code editor, compiler, and debugger. Effective C programs are structured with elements like header files, main functions, comments, and exit codes.

Uploaded by

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

Introduction To C Programming

This document provides an introduction to C programming. It discusses the origins of computing from the abacus to modern programming languages like Python and Java. C programming is a high-level, procedural language that uses a compiler to translate code into machine-readable instructions. Learning to program develops problem-solving and logical thinking skills. Integrated development environments help programmers write, build, and debug C programs, providing tools like a code editor, compiler, and debugger. Effective C programs are structured with elements like header files, main functions, comments, and exit codes.

Uploaded by

Princess Jeanny
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

USJR, SCHOOL OF ENGINEERING

DEPARTMENT OF COMPUTER ENGINEERING


CEBU CITY, PHILIPPINES

INTRODUCTION TO C PROGRAMMING

ENGR. SHIELA M. CABAHUG 1


WHY?
LEARN PROGRAMMING

cheeseburger.com via Goyaa

to understand Programming MEMES

ENGR. SHIELA M. CABAHUG 2


Photo by: viterbischool.usc.edu (University of Southern California)

WHY should you learn How to Program?


ENGR. SHIELA M. CABAHUG 3
source: via twitter @HiddenFigures
source: https://i.redd.it/

ENGR. SHIELA M. CABAHUG 4


COMPUTING ORIGINS
Charles Herman Hollerith: Alan Turing:
invented the 1st Konrad Zeus, Grace Hopper,
Babbage: Alan Turing
Electro- programmable found a bug on
Blaise Pascal Father of machine that is
Mechanical machine using the Mark 1
invented the 1st Computer. capable of
Invented the computer. He Boolean logic. machine and
Mechanical computing Inventor of
Calculator steam-engine founded a company anything. coined the term
power calculator now called IBM. Modern ‘debugging’
(Universal) Computer
123rf.com pinterest

1642 1937 -
3000 BC
1800s 1890 1936 1937 1942

Abacus:
Ancient
use for 1st Generation
computing
Computers: Use
wikipedia.org wikipedia.org of Vacuum
www.computerhistory.org nationalgeographic
Tubes. 1st Digital
Computers
source: https://www.youtube.com/watch?v=-M6lANfzFsM

ENGR. SHIELA M. CABAHUG 5


A14 : 11.8 billion

Source: Henriok -
Own work under
license CC0

wikipedia.org

ENGR. SHIELA M. CABAHUG 6


PROGRAMMING LANGUAGES
The rise of high C++
level language. Python Modern programming
These means that Java languages which uses
programs are C#
programming
Computers only ASSEMBLY written in the architectures to do
language of
OBJECT-
understand/read complex programming,
binary
LANGUAGE humans. (Use of ORIENTED
GUI
numbers(0s,1s) English Language)

Assembler, the It’s a high-level


MACHINE use of operands, PROCEDURAL programming MODELLING
LANGUAGE arithmetic LANGUAGE language that
integrates the
FORTRAN (IBM) use of objects in
COBOL the program
C
BASIC

http://www.tesla-institute.com/

ENGR. SHIELA M. CABAHUG 7


LEARNING HOW TO PROGRAM
➢Enables YOU to THINK
➢Build your own software application for your business
➢Develops your Analytical, Critical, and Logical Thinking
➢Enables you to solve real world problems
➢Empowers your creativity
➢Digital Technology is ruling the world.

ENGR. SHIELA M. CABAHUG 8



Everybody should learn
to program a computer,
because it teaches you
how to think

-Steve Jobs

ENGR. SHIELA M. CABAHUG 9


“ I choose a lazy person
to do a hard job
because lazy person
will find a way to do an
easy way to do it.
_Bill Gates


ENGR. SHIELA M. CABAHUG 10

source: https://www.raconteur.net/top-ten-construction-innovations/

ENGR. SHIELA M. CABAHUG 11


Source: The American Society of Mechanical Engineers, 7-biggest-trends-for-engineering-in-the-2020s

ENGR. SHIELA M. CABAHUG 12


THE C PROGRAMMING LANGUAGE
is a high-level language and procedural programming that allows us to write
programs that are independent of the type of computer. The high-level languages
are named as high-level because they are close to human languages and can be
understood easily, however it requires attention to the logic of the problem. The
language needs a compiler to translate a high-level language into a low-level
language. C language is structured programming that specifies a series of well-
structured procedures and steps to compose a program.

ENGR. SHIELA M. CABAHUG 13


IDE (Integrated Development Environment)
An integrated development environment is a software application that
provides comprehensive facilities to computer programmers for software
development. An IDE normally consists of at least a source code editor,
build automation tools and a debugger.
Examples of IDE
◦ Visual Studio
◦ DevC – used in this course
◦ Visual Code
◦ Notepad++
◦ etc.

ENGR. SHIELA M. CABAHUG 14


DEV-C++ Build Automation Tools

Code Editor

Debugger/Messages

ENGR. SHIELA M. CABAHUG 15


C PROGRAMMING STRUCTURE
Predefined/Header Files/Libraries

Main Function

Comments
C programming Syntax/C Codes

Exit/Pause code for a program

ENGR. SHIELA M. CABAHUG 16


Terms to Remember !
C Standard library functions or simply C Library functions are inbuilt functions
PRE-DEFINED LIBRARIES
in C programming
source: programiz.com

A comment starts with a slash asterisk /* and ends with a asterisk slash */ and can be anywhere in
COMMENTS your program or // . Comments will help you and others understand the flow of your written
code.

SYNTAX is the set of rules governing writing of software in the C language. It is designed to allow for programs
that are extremely terse, have a close relationship with the resulting object code, and yet provide
relatively high-level data abstraction. source: wikipedia.org

COMPILE AND RUN when you compile your program, it will look for the main function, and it will translate to a
machine language. You need to have a C compiler that is provided by the IDE. Running
your program means it execute what should it do based on your written program

ENGR. SHIELA M. CABAHUG 17


DEMO
Installing IDE

ENGR. SHIELA M. CABAHUG 18

You might also like