Unformatted text preview:

Introduction to C To Be a Master Programmer Instructor Yin Lou 02 18 2011 Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Types operators and expression Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Types operators and expression I I int unsigned int long double etc Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Types operators and expression I I I int unsigned int long double etc Control flow Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Types operators and expression I I I int unsigned int long double etc Control flow I I if else switch while do while for break continue Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Types operators and expression I I I Control flow I I I int unsigned int long double etc if else switch while do while for break continue Functions program structure and project management Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Types operators and expression I I I Control flow I I I int unsigned int long double etc if else switch while do while for break continue Functions program structure and project management I I I Recursion Header file Makefile Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Types operators and expression I I I Control flow I I I if else switch while do while for break continue Functions program structure and project management I I I I int unsigned int long double etc Recursion Header file Makefile Pointers and arrays I I I I int p x int a 10 int p int malloc n sizeof int Array names are constant while pointers are usually variables Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Complex types Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Complex types I I I enum struct union typedef function pointers Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Complex types I I I I enum struct union typedef function pointers Preprocessing Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Complex types I I I I enum struct union typedef function pointers Preprocessing I include define ifndef endif Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Complex types I I I I Preprocessing I I enum struct union typedef function pointers include define ifndef endif Standard I O Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Complex types I I I I Preprocessing I I enum struct union typedef function pointers include define ifndef endif Standard I O I I I printf sprintf fprintf scanf sscanf fscanf fread fwrite Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Complex types I I I I Preprocessing I I include define ifndef endif Standard I O I I I I enum struct union typedef function pointers printf sprintf fprintf scanf sscanf fscanf fread fwrite Threads Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Complex types I I I I Preprocessing I I include define ifndef endif Standard I O I I I I enum struct union typedef function pointers printf sprintf fprintf scanf sscanf fscanf fread fwrite Threads I pthread Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Complex types I I I I Preprocessing I I I I printf sprintf fprintf scanf sscanf fscanf fread fwrite Threads I I include define ifndef endif Standard I O I I enum struct union typedef function pointers pthread All these can be done with Introduction to C CS 2022 Spring 2011 Lecture 12 Course Recap I Complex types I I I I Preprocessing I I I I printf sprintf fprintf scanf sscanf fscanf fread fwrite Threads I I include define ifndef endif Standard I O I I enum struct union typedef function pointers pthread All these can be done with I The compiler gcc Introduction to C CS 2022 Spring 2011 Lecture 12 Start with Hello World include stdio h int main printf Hello World n return 0 Introduction to C CS 2022 Spring 2011 Lecture 12 Master Programmer vs Beginner Can you answer the following question I Why do programs need to be compiled before execution Introduction to C CS 2022 Spring 2011 Lecture 12 Master Programmer vs Beginner Can you answer the following question I Why do programs need to be compiled before execution I What does the compiler do during the process of converting C source code to machine code and how Introduction to C CS 2022 Spring 2011 Lecture 12 Master Programmer vs Beginner Can you answer the following question I Why do programs need to be compiled before execution I What does the compiler do during the process of converting C source code to machine code and how I What does the executable code look like What else besides machine code How do they store and organize Introduction to C CS 2022 Spring 2011 Lecture 12 Master Programmer vs Beginner Can you answer the following question I Why do programs need to be compiled before execution I What does the compiler do during the process of converting C source code to machine code and how I What does the executable code look like What else besides machine code How do they store and organize I What does include stdio h mean Why we need to include it What is a C library and how is it implemented Introduction to C CS 2022 Spring 2011 Lecture 12 Master Programmer vs Beginner Can you answer the following question I Why do programs need to be compiled before execution I What does the compiler do during the process of converting C source code to machine code and how I What does the executable code look like What else besides machine code How do they store and organize I What does include stdio h mean Why we need to include it What is a C library and how is it implemented I Do codes compiled by different compilers gcc Microsoft VC on different machines x86 ARM look the same Why Introduction to C CS 2022 Spring 2011 Lecture 12 Master Programmer vs Beginner I How does our Hello World run How does the operating system load it Where does it start execution Where does it end execution What happens before main function What happens after main function Introduction to C CS 2022 Spring 2011 Lecture 12 Master Programmer vs Beginner I How does our Hello World run How does the operating system load it Where does it start execution Where does it end execution What happens before main function What happens after main function I If there s no operating system can our Hello World run If we need to run Hello World on a machine without operating system how can we make it Introduction to C CS 2022 Spring 2011 Lecture 12 Master


View Full Document

CORNELL CS 2022 - Lecture Notes

Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?