Review C Language Features –control flow –C operators –program structure –data types –I/O and files Problem Solving Abilities.

Slides:



Advertisements
Similar presentations
Incomplete Structs struct B; struct A { struct B * partner; // other declarations… }; struct B { struct A * partner; // other declarations… };
Advertisements

Numerical Recipes The Art of Scientific Computing (with some applications in computational physics)
Question Bank. Explain the syntax of if else statement? Define Union Define global and local variables with example Concept of recursion with example.
Dynamic Allocation and Linked Lists. Dynamic memory allocation in C C uses the functions malloc() and free() to implement dynamic allocation. malloc is.
Overview of programming in C C is a fast, efficient, flexible programming language Paradigm: C is procedural (like Fortran, Pascal), not object oriented.
Dynamic Memory Allocation in C.  What is Memory What is Memory  Memory Allocation in C Memory Allocation in C  Difference b\w static memory allocation.
Data Structure & Abstract Data Type
Programming Languages and Paradigms The C Programming Language.
Unions The storage referenced by a union variable can hold data of different types subject to the restriction that at any one time, the storage holds data.
C Programming - Lecture 5
Kernighan/Ritchie: Kelley/Pohl:
Discussion: Week 3/26. Structs: Used to hold associated data together Used to group together different types of variables under the same name struct Telephone{
Dynamic Data Structures H&K Chapter 14 Instructor – Gokcen Cilingir Cpt S 121 (July 26, 2011) Washington State University.
CIS 101: Computer Programming and Problem Solving Lecture 8 Usman Roshan Department of Computer Science NJIT.
1 CSE1301 Computer Programming: Revision 1. 2 Topics Type of questions What do you need to know? About the exam Exam technique Staff consultation Sample.
C Programming Basics Lecture 5 Engineering H192 Winter 2005 Lecture 05
Wednesday, 12/11/02, Slide #1 CS 106 Intro to Comp. Sci. 1 Wednesday, 12/11/02  QUESTIONS??  Today: CLOSING CEREMONIES!  HW #5 – Back Monday (12/16)
1 CSE1301 Computer Programming: Lecture 35 Revision.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect M1 P. 1Winter Quarter Midterm I Review Topics.
COMP1170 Midterm Preparation (March 17 th 2009) Acknowledgment The notes are adapted from those provided by Deitel & Associates, Inc. and Pearson Education.
CSE1301 Computer Programming: Revision. Topics Type of questions What do you need to know? About the exam Exam technique Sample questions.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect FXP. 1Winter Quarter Course Wrap Up and.
CSE : Programming in C Instructor: Lei Wang Office: Dreese Lab 474 Office Hour: Friday.
1 COMP 2130 Introduction to Computer Systems Computing Science Thompson Rivers University.
1 CSE1301 Computer Programming: Revision. 2 Topics Type of questions What do you need to know? About the exam Exam technique Staff consultation Revision.
Operator Precedence First the contents of all parentheses are evaluated beginning with the innermost set of parenthesis. Second all multiplications, divisions,
C Tokens Identifiers Keywords Constants Operators Special symbols.
17. ADVANCED USES OF POINTERS. Dynamic Storage Allocation Many programs require dynamic storage allocation: the ability to allocate storage as needed.
1 Revision Before Exam-I. 2 Exam-I Scope l We discussed the scope of Exam-I and decided to move the topic of file handling to the final exam l A previously.
Programming Language C++ Xulong Peng CSC415 Programming Languages.
Java ProgrammingtMyn1 Java Programming Timo Mynttinen Mikkeli University of Applied Sciences.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 12: Pointers continued, C strings.
Lecture 13 Static vs Dynamic Memory Allocation
Chapter 0.2 – Pointers and Memory. Type Specifiers  const  may be initialised but not used in any subsequent assignment  common and useful  volatile.
1 CSE1301 Computer Programming: Revision. 2 Topics Type of questions What do you need to know? About the exam Exam technique Staff consultation Revision.
Midterm Review CS1220 Spring Disclaimer The following questions are representative of those that will appear on the midterm exam. They do not represent.
Pointers: Basics. 2 What is a pointer? First of all, it is a variable, just like other variables you studied  So it has type, storage etc. Difference:
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 5P. 1Winter Quarter C Programming Basics.
Chapters 1-5 Review C++ Class. Chapter 1 – the big picture Objects Class Inheritance Reusability Polymorphism and Overloading.
1 Pointers to structs. 2 A pointer to a struct is used in the same way as a pointer to a simple type, such as an int. Pointers to structs were introduced.
Instructor: Alexander Stoytchev CprE 185: Intro to Problem Solving (using C)
19&20-2 Know how to declare pointer variables. Understand the & (address) and *(indirection) operators. Dynamic Memory Allocation Related Chapter: ABC.
1 Homework HW5 due today Review a lot of things about allocation of storage that may not have been clear when we covered them in our initial pass Introduction.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 5P. 1Winter Quarter C Programming Basics Lecture 5.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Lucas Bang Lecture 13: Data structures in C.
ECE 264 Object-Oriented Software Development Instructor: Dr. Honggang Wang Fall 2012 Lecture 22: Pointers.
C LANGUAGE Characteristics of C · Small size
EEL 3801 C++ as an Enhancement of C. EEL 3801 – Lotzi Bölöni Comments  Can be done with // at the start of the commented line.  The end-of-line terminates.
Lecture 15: Course Review BJ Furman ME 30 16MAY2011.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee C Language Part 5.
Chapter 1 Java Programming Review. Introduction Java is platform-independent, meaning that you can write a program once and run it anywhere. Java programs.
ENEE150 – 0102 ANDREW GOFFIN Dynamic Memory. Dynamic vs Static Allocation Dynamic  On the heap  Amount of memory chosen at runtime  Can change allocated.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Lucas Bang Lecture 11: Pointers.
C Part 1 Computer Organization I 1 August 2009 © McQuain, Feng & Ribbens A History Lesson Development of language by Dennis Ritchie at Bell.
CS 1428 Final Exam Review. Exam Format 200 Total Points – 60 Points Writing Programs – 45 Points Tracing Algorithms and determining results – 20 Points.
Outcome based Learning Objectives
Introduction to Programming
LESSON 3 IO, Variables and Operators
Programming Languages and Paradigms
C++, OBJECT ORIENTED PROGRAMMING
BY GAWARE S.R. COMPUTER SCI. DEPARTMENT
C Short Overview Lembit Jürimägi.
Programming Paradigms
Pointers The C programming language gives us the ability to directly manipulate the contents of memory addresses via pointers. Unfortunately, this power.
CS111 Computer Programming
Programming Language C Language.
C Programming Lecture-8 Pointers and Memory Management
C Programming - Lecture 5
Programming Languages and Paradigms
C Language B. DHIVYA 17PCA140 II MCA.
Presentation transcript:

Review C Language Features –control flow –C operators –program structure –data types –I/O and files Problem Solving Abilities

Control flow Looping with while, for, do-while conditional execution with if, if-else, switch jumps with break, continue, goto

Control flow for(j = 0, j < 10; ++j) {... } if ( x < 0 ) {... } else {... }

C Operators Meaning of the various operators and their precedence and association. What are ++, --, &&, ||, !, ~, &, ^, |, =, ==, !=,, >>,,., ? :, sizeof, etc

Program Structure main() and function, function prototype declaration, function definition, argument passing, call by value vs call by reference. Auto, extern, static storage classes Use of standard library functions, especially I/O functions.

Program Structure #include int g = 0; char f(int x); main() { char c; c = f(5);... } char f(int x) {... }

Data Types Simple data types - int, char, float, double Array, pointer, equivalence between array syntax and pointer syntax User defined types - structure, typedef

Data Types main() { int x, y, *p; char s[100]; struct str { float u; float v; int *pt; } a, b, c;... }

Others Macros, #define, #if, etc Open and close files Dynamic memory allocation, malloc(), calloc() Internal representations of integers Type casts

Problem Solving The ability of solving a problem by computation through a computer program (efficiently)

Final Exam Last for 2 hours 5 to 6 problems with varied weights Problems similar to tutorials and labs Requirement of memorization is minimal Overall weights, midterm and quizzes 20%, labs 20%, final 60%

Consultation During Review Period Feel free to ask A/Prof Wang Jian-Sheng or Mdm Alice Heng questions on C. A/Prof Wang's office: S17, Level 7, room Tel Consult our CZ1102 web pages (transparencies) if you have never been there: