SlideShare a Scribd company logo
1 of 68
Introduction
Basic info about the course ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
VERY IMPORTANT NOTICE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Basic info about the course ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Grading ,[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Exams and labs ,[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Exams and labs ,[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Course outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Let’s get started ! ,[object Object],Fall 2008 CMPE 150 – Introduction to Computing
A computer system ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Input and output devices Fall 2008 CMPE 150 – Introduction to Computing Input Input Input Input Input Output Output /Output /Output
A computer system ,[object Object],Fall 2008 CMPE 150 – Introduction to Computing
A computer system ,[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing HARDWARE OPERATING SYSTEM (Windows, Linux, MacOS, etc.) APPLICATIONS (Eg: Word, Excel, Explorer, MSN, C Compiler,  your own programs, etc.) SOFTWARE
A computer system ,[object Object],Fall 2008 CMPE 150 – Introduction to Computing
CPU: Central Processing Unit ,[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
CPU: Central Processing Unit Fall 2008 CMPE 150 – Introduction to Computing Control Unit Registers Arithmetic & Logic Unit R1 R2 . . . Rm IR ...
How are the instructions executed? Fall 2008 CMPE 150 – Introduction to Computing Central Processing Unit (CPU) Control Unit Registers Arithmetic & Logic Unit instr  2 instr  3 ... instr  n instr  1 Program Main Memory R1 R2 . . . Rm IR ...
How do we write programs? Fall 2008 CMPE 150 – Introduction to Computing We write our programs in &quot;C language&quot;  (which is an English-like language) #include <stdio.h> int main() { printf(&quot;Hello world!&quot;); return 0; } We use a compiler (such as GCC, Visual C, Borland C, etc.) to translate our program from &quot;C language&quot; to  &quot;machine language&quot; Compile & Link This is the executable code in &quot;machine language.&quot; This is the only thing the computer can understand and run (execute). 1110101011001001010001010100101000010010100101010101000101001000100101001 (source code) (object code) (machine code or executable code)
Statement vs. Instruction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Why have input/output? ,[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Execution of an instruction ,[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing Central Processing Unit (CPU) Control Unit Registers Arithmetic & Logic Unit ... a=b+2 Main Memory R1 R2 . . . Rm IR ... b 6 6 ... a=b+2 2 8 a 4 Program
Welcome to C Programming Language ,[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing We write our programs in &quot;C language&quot;  (which is an English-like language) #include <stdio.h> int main() { printf(&quot;Hello world!&quot;); return 0; } We use a compiler (such as GCC, Visual C, Borland C, etc.) to translate our program from &quot;C language&quot; to  &quot;machine language&quot; Compile & Link This is the executable code in &quot;machine language.&quot; This is the only thing the computer can understand and run (execute). 1110101011001001010001010100101000010010100101010101000101001000100101001 (source code) (object code) (machine code or executable code)
Our first C program: Hello World ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Need for input ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
A program that also performs input ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing C Program User screen _ _ _  5   8 _ Read two integers (decimals) into variables a and b Display the value of variable c after the text &quot;Result is&quot;
Variables ,[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Variables ,[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Variables ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing    2 13 +2 10 +2 9 +2 7 +2 5 +2 4 +2 2 +2 1 +2 0 =9911 0 0 1 0 0 1 1 0 1 0 1 1 0 1 1 1 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Variables ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing Program 10 7 3 5 a ... b ... c ...
Rules for identifier names ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Rules for identifier names ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Standard data types ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Integers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Integers ,[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing sign bit value 0 0 1 0 0 1 1 0 1 0 1 1 0 1 1 1
Integers ,[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Floating-point numbers ,[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Floating-point numbers ,[object Object],Fall 2008 CMPE 150 – Introduction to Computing Lower limit Upper limit The value you want to store Due to loss of precision, what you actually store might be this , or this
Floating-point numbers ,[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Characters ,[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Characters ,[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Characters ,[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Characters ,[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
ASCII table (partial) Fall 2008 CMPE 150 – Introduction to Computing ASCII code Symbol ASCII code Symbol ASCII code Symbol ASCII code Symbol ... ... 66 B 84 T 107 k 32 blank 67 C 85 U 108 l 37 % 68 D 86 V 109 m 42 * 69 E 87 W 110 n 43 + 70 F 88 X 111 o ... ... 71 G 89 Y 112 p 48 0 72 H 90 Z 113 q 49 1 73 I ... ... 114 r 50 2 74 J 97 a 115 s 51 3 75 K 98 b 116 t 52 4 76 L 99 c 117 u 53 5 77 M 100 d 118 v 54 6 78 N 101 e 119 w 55 7 79 O 102 f 120 x 56 8 80 P 103 g 121 y 57 9 81 Q 104 h 122 z ... ... 82 R 105 i ... ... 65 A 83 S 106 j    
Characters ,[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Characters ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Characters ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Constants ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Enumerated type ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing Text in  green  is optional
Operators ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Assignment and type conversion ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Operators ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Operators ,[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Operators ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Operators Fall 2008 CMPE 150 – Introduction to Computing ,[object Object],[object Object],[object Object],a b a && b a || b true true true true true false false true false true false true false false false false
Operators ,[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Operators ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Operators Fall 2008 CMPE 150 – Introduction to Computing Operation Result 5 & 10 (0000 0101 & 0000 1010) 0 (0000 0000) 5 && 10 (0000 0101 && 0000 1010) 1 (0000 0001) 5 | 10 (0000 0101 | 0000 1010) 15 (0000 1111) 8 ^ 10 (0000 0111 ^ 0000 1010) 13 (0000 1101) 7  << 2 (0000 0111 << 0000 0010) 28 (0001 1100) 7  >> 2 (0000 0111 >> 0000 0010) 1 (0000 0001) ~5 (~0000 0101) -6 (in two’s complement) (1111 1010)
Operators ,[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Operators ,[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Operators ,[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Operators ,[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Operators Fall 2008 CMPE 150 – Introduction to Computing Symbol Usage Meaning == x == y is x equal to y? != x != y is x not equal to y? > x > y is x greater than y? < x < y is x less than y? >= x >= y is x greater than or equal to y? <= x <=y is x less than or equal to y?
Operators ,[object Object],Fall 2008 CMPE 150 – Introduction to Computing Symbol Usage Meaning && exp1 && exp2 AND || exp1 || exp2 OR ! ! exp NOT
Operators ,[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Operator precedence table Fall 2008 CMPE 150 – Introduction to Computing Operator Associativity ()  []  .  -> left-to-right ++  --  +  -  !  ~  (type)  *  &  sizeof   right-to-left *  /  % left-to-right +  - left-to-right <<  >> left-to-right <  <=  >  >= left-to-right ==  != left-to-right & left-to-right ^ left-to-right | left-to-right && left-to-right || left-to-right ?: right-to-left =  +=  -=  *=  /=  %=  &=  ^=  |=  <<=  >>= right-to-left , left-to-right
Operators ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Type casting ,[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing
Type casting ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fall 2008 CMPE 150 – Introduction to Computing

More Related Content

What's hot

1.1 programming fundamentals
1.1 programming fundamentals1.1 programming fundamentals
1.1 programming fundamentalsJawad Khan
 
Computer programming all chapters
Computer programming all chaptersComputer programming all chapters
Computer programming all chaptersIbrahim Elewah
 
[ITP - Lecture 03] Introduction to C/C++
[ITP - Lecture 03] Introduction to C/C++[ITP - Lecture 03] Introduction to C/C++
[ITP - Lecture 03] Introduction to C/C++Muhammad Hammad Waseem
 
Assembler Language Tutorial for Mainframe Programmers
Assembler Language Tutorial for Mainframe ProgrammersAssembler Language Tutorial for Mainframe Programmers
Assembler Language Tutorial for Mainframe ProgrammersSrinimf-Slides
 
Programming Fundamentals and basic knowledge
Programming Fundamentals and basic knowledge Programming Fundamentals and basic knowledge
Programming Fundamentals and basic knowledge imtiazalijoono
 
Begin with c++ Fekra Course #1
Begin with c++ Fekra Course #1Begin with c++ Fekra Course #1
Begin with c++ Fekra Course #1Amr Alaa El Deen
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...Bilal Amjad
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1Manoj Patil
 
QBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern ProgrammingQBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern ProgrammingGifty Belle Manaois
 
Workshop Assembler
Workshop AssemblerWorkshop Assembler
Workshop AssemblerTuhin_Das
 
Bca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed controlBca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed controlRai University
 
12109 microprocessor & programming
12109 microprocessor & programming12109 microprocessor & programming
12109 microprocessor & programmingGaurang Thakar
 
Microprocessor chapter 9 - assembly language programming
Microprocessor  chapter 9 - assembly language programmingMicroprocessor  chapter 9 - assembly language programming
Microprocessor chapter 9 - assembly language programmingWondeson Emeye
 
Programming the basic computer
Programming the basic computerProgramming the basic computer
Programming the basic computerKamal Acharya
 

What's hot (20)

1.1 programming fundamentals
1.1 programming fundamentals1.1 programming fundamentals
1.1 programming fundamentals
 
Computer programming all chapters
Computer programming all chaptersComputer programming all chapters
Computer programming all chapters
 
[ITP - Lecture 03] Introduction to C/C++
[ITP - Lecture 03] Introduction to C/C++[ITP - Lecture 03] Introduction to C/C++
[ITP - Lecture 03] Introduction to C/C++
 
Assembler Language Tutorial for Mainframe Programmers
Assembler Language Tutorial for Mainframe ProgrammersAssembler Language Tutorial for Mainframe Programmers
Assembler Language Tutorial for Mainframe Programmers
 
Programming Fundamentals and basic knowledge
Programming Fundamentals and basic knowledge Programming Fundamentals and basic knowledge
Programming Fundamentals and basic knowledge
 
Intro to assembly language
Intro to assembly languageIntro to assembly language
Intro to assembly language
 
Begin with c++ Fekra Course #1
Begin with c++ Fekra Course #1Begin with c++ Fekra Course #1
Begin with c++ Fekra Course #1
 
Basic of compiler
Basic of compiler Basic of compiler
Basic of compiler
 
The Knowledge of QBasic
The Knowledge of QBasicThe Knowledge of QBasic
The Knowledge of QBasic
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
 
Lec 1 intro
Lec 1 introLec 1 intro
Lec 1 intro
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
 
Single Pass Assembler
Single Pass AssemblerSingle Pass Assembler
Single Pass Assembler
 
QBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern ProgrammingQBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern Programming
 
Workshop Assembler
Workshop AssemblerWorkshop Assembler
Workshop Assembler
 
Bca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed controlBca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed control
 
12109 microprocessor & programming
12109 microprocessor & programming12109 microprocessor & programming
12109 microprocessor & programming
 
Microprocessor chapter 9 - assembly language programming
Microprocessor  chapter 9 - assembly language programmingMicroprocessor  chapter 9 - assembly language programming
Microprocessor chapter 9 - assembly language programming
 
Phases of Compiler
Phases of CompilerPhases of Compiler
Phases of Compiler
 
Programming the basic computer
Programming the basic computerProgramming the basic computer
Programming the basic computer
 

Similar to Introduction to C

Introduction
IntroductionIntroduction
IntroductionKamran
 
Lec1_EENG112-Introduction.pdf
Lec1_EENG112-Introduction.pdfLec1_EENG112-Introduction.pdf
Lec1_EENG112-Introduction.pdfShwetaSaharan8
 
IITK ESC 111M Lec02.pptx .
IITK ESC 111M Lec02.pptx               .IITK ESC 111M Lec02.pptx               .
IITK ESC 111M Lec02.pptx .AbhimanyuChaure
 
Contents Pre-requisites Approximate .docx
   Contents Pre-requisites  Approximate .docx   Contents Pre-requisites  Approximate .docx
Contents Pre-requisites Approximate .docxShiraPrater50
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfMMRF2
 
Intro To C++ - Class 03 - An Introduction To C++ Programming, Part II
Intro To C++ - Class 03 - An Introduction To C++ Programming, Part IIIntro To C++ - Class 03 - An Introduction To C++ Programming, Part II
Intro To C++ - Class 03 - An Introduction To C++ Programming, Part IIBlue Elephant Consulting
 
INTRODUCCIÓN A LA PROGRAMACIÓN
INTRODUCCIÓN A LA PROGRAMACIÓNINTRODUCCIÓN A LA PROGRAMACIÓN
INTRODUCCIÓN A LA PROGRAMACIÓNBenjaminAnilema
 
Learn C Programming Full Course Free
Learn C Programming Full Course FreeLearn C Programming Full Course Free
Learn C Programming Full Course FreeDheeraj Patidar
 
c_algo_flowchart.pdf
c_algo_flowchart.pdfc_algo_flowchart.pdf
c_algo_flowchart.pdfsimmis5
 
Computer and programing basics.pptx
Computer and programing basics.pptxComputer and programing basics.pptx
Computer and programing basics.pptxgaafergoda
 
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...Sivaranjan Goswami
 
Session 1
Session 1Session 1
Session 1pham vu
 

Similar to Introduction to C (20)

Introduction
IntroductionIntroduction
Introduction
 
Lec1_EENG112-Introduction.pdf
Lec1_EENG112-Introduction.pdfLec1_EENG112-Introduction.pdf
Lec1_EENG112-Introduction.pdf
 
IITK ESC 111M Lec02.pptx .
IITK ESC 111M Lec02.pptx               .IITK ESC 111M Lec02.pptx               .
IITK ESC 111M Lec02.pptx .
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Contents Pre-requisites Approximate .docx
   Contents Pre-requisites  Approximate .docx   Contents Pre-requisites  Approximate .docx
Contents Pre-requisites Approximate .docx
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
PPS Unit-1.pdf
PPS Unit-1.pdfPPS Unit-1.pdf
PPS Unit-1.pdf
 
Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++
 
Savitch Ch 01
Savitch Ch 01Savitch Ch 01
Savitch Ch 01
 
Intro To C++ - Class 3 - Sample Program
Intro To C++ - Class 3 - Sample ProgramIntro To C++ - Class 3 - Sample Program
Intro To C++ - Class 3 - Sample Program
 
Intro To C++ - Class 03 - An Introduction To C++ Programming, Part II
Intro To C++ - Class 03 - An Introduction To C++ Programming, Part IIIntro To C++ - Class 03 - An Introduction To C++ Programming, Part II
Intro To C++ - Class 03 - An Introduction To C++ Programming, Part II
 
Savitch ch 01
Savitch ch 01Savitch ch 01
Savitch ch 01
 
Savitch ch 01
Savitch ch 01Savitch ch 01
Savitch ch 01
 
INTRODUCCIÓN A LA PROGRAMACIÓN
INTRODUCCIÓN A LA PROGRAMACIÓNINTRODUCCIÓN A LA PROGRAMACIÓN
INTRODUCCIÓN A LA PROGRAMACIÓN
 
Learn C Programming Full Course Free
Learn C Programming Full Course FreeLearn C Programming Full Course Free
Learn C Programming Full Course Free
 
c_algo_flowchart.pdf
c_algo_flowchart.pdfc_algo_flowchart.pdf
c_algo_flowchart.pdf
 
Computer and programing basics.pptx
Computer and programing basics.pptxComputer and programing basics.pptx
Computer and programing basics.pptx
 
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...
 
Session 1
Session 1Session 1
Session 1
 

Recently uploaded

Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 

Recently uploaded (20)

Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 

Introduction to C

  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. Input and output devices Fall 2008 CMPE 150 – Introduction to Computing Input Input Input Input Input Output Output /Output /Output
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. CPU: Central Processing Unit Fall 2008 CMPE 150 – Introduction to Computing Control Unit Registers Arithmetic & Logic Unit R1 R2 . . . Rm IR ...
  • 17. How are the instructions executed? Fall 2008 CMPE 150 – Introduction to Computing Central Processing Unit (CPU) Control Unit Registers Arithmetic & Logic Unit instr 2 instr 3 ... instr n instr 1 Program Main Memory R1 R2 . . . Rm IR ...
  • 18. How do we write programs? Fall 2008 CMPE 150 – Introduction to Computing We write our programs in &quot;C language&quot; (which is an English-like language) #include <stdio.h> int main() { printf(&quot;Hello world!&quot;); return 0; } We use a compiler (such as GCC, Visual C, Borland C, etc.) to translate our program from &quot;C language&quot; to &quot;machine language&quot; Compile & Link This is the executable code in &quot;machine language.&quot; This is the only thing the computer can understand and run (execute). 1110101011001001010001010100101000010010100101010101000101001000100101001 (source code) (object code) (machine code or executable code)
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43. ASCII table (partial) Fall 2008 CMPE 150 – Introduction to Computing ASCII code Symbol ASCII code Symbol ASCII code Symbol ASCII code Symbol ... ... 66 B 84 T 107 k 32 blank 67 C 85 U 108 l 37 % 68 D 86 V 109 m 42 * 69 E 87 W 110 n 43 + 70 F 88 X 111 o ... ... 71 G 89 Y 112 p 48 0 72 H 90 Z 113 q 49 1 73 I ... ... 114 r 50 2 74 J 97 a 115 s 51 3 75 K 98 b 116 t 52 4 76 L 99 c 117 u 53 5 77 M 100 d 118 v 54 6 78 N 101 e 119 w 55 7 79 O 102 f 120 x 56 8 80 P 103 g 121 y 57 9 81 Q 104 h 122 z ... ... 82 R 105 i ... ... 65 A 83 S 106 j    
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57. Operators Fall 2008 CMPE 150 – Introduction to Computing Operation Result 5 & 10 (0000 0101 & 0000 1010) 0 (0000 0000) 5 && 10 (0000 0101 && 0000 1010) 1 (0000 0001) 5 | 10 (0000 0101 | 0000 1010) 15 (0000 1111) 8 ^ 10 (0000 0111 ^ 0000 1010) 13 (0000 1101) 7 << 2 (0000 0111 << 0000 0010) 28 (0001 1100) 7 >> 2 (0000 0111 >> 0000 0010) 1 (0000 0001) ~5 (~0000 0101) -6 (in two’s complement) (1111 1010)
  • 58.
  • 59.
  • 60.
  • 61.
  • 62. Operators Fall 2008 CMPE 150 – Introduction to Computing Symbol Usage Meaning == x == y is x equal to y? != x != y is x not equal to y? > x > y is x greater than y? < x < y is x less than y? >= x >= y is x greater than or equal to y? <= x <=y is x less than or equal to y?
  • 63.
  • 64.
  • 65. Operator precedence table Fall 2008 CMPE 150 – Introduction to Computing Operator Associativity () [] . -> left-to-right ++  -- +  - !  ~ (type) * & sizeof   right-to-left *  /  % left-to-right +  - left-to-right <<  >> left-to-right <  <= >  >= left-to-right ==  != left-to-right & left-to-right ^ left-to-right | left-to-right && left-to-right || left-to-right ?: right-to-left = +=  -= *=  /= %=  &= ^=  |= <<=  >>= right-to-left , left-to-right
  • 66.
  • 67.
  • 68.