Announcements Homework #5 due Monday 1:30pm

Slides:



Advertisements
Similar presentations
Announcements Homework #8 due Monday at 6:00pm Reference implementation coming soon! Upcoming office hours: Tomorrow: Chris 1:30-3pm, Swati 6:30-7:30pm.
Advertisements

Functions Definition: Instruction block called by name Good design: Each function should perform one task and do it well Functions are the basic building.
Pointers Example Use int main() { int *x; int y; int z; y = 10; x = &y; y = 11; *x = 12; z = 15; x = &z; *x = 5; z = 8; printf(“%d %d %d\n”, *x, y, z);
Functions in C. Function Terminology Identifier scope Function declaration, definition, and use Parameters and arguments Parameter order, number, and.
COE Computer Organization & Assembly Language Talal Alkharobi.
University of Malta CSA2090: Lecture 4 © Chris Staff 1 of 20 CSA2090: Systems Programming Introduction to C Dr. Christopher Staff.
Measuring Elapsed Time. Units of Time 1 minute (min) = 60 seconds (s) 1 hour (h) = 60 minutes 1 day = 24 h 1 week (wk) = 7 days 1 year is about 365 days.
Announcements Homework #2 will be posted after class – Due Monday, Oct 1, 1:30pm Upcoming office hours: – Tomorrow: Sheng, 12-1:30pm, 207 Moore – Monday:
COMP 110 More about classes Luv Kohli October 3, 2008 MWF 2-2:50 pm Sitterson 014.
Pointers and Classes.
Cen 112 C Programming Özgür Örnek.
CprE 185: Intro to Problem Solving (using C)
CS 240 – Computer Programming I Lab
Winter 2009 Tutorial #6 Arrays Part 2, Structures, Debugger
ECE Application Programming
C programming---Arrays
Understand argc and argv
EPSII 59:006 Spring 2004.
C Language By Sra Sontisirikit
COSC 220 Computer Science II
Command Line Arguments
The University of Toledo
Programming Paradigms
Command-Line Arguments
ECE Application Programming
General HTM Announcements
Recursion.
Lecture 11: Strings B Burlingame 11 April 2018.
CPA Firms in New York. Accountants can help you discover your insurance requirements, and tackle financial decisions and provide small business marketing.
CS 1430: Programming in C++.
CprE 185: Intro to Problem Solving (using C)
Announcements Homework #7 due Monday at 3:00pm
Pointers.
Command Line Arguments
Arrays & pointers C How to Program, 8/e.
Review of 2 dimension arrays.
Announcements Homework #2 solutions in Blackboard
C Characters and Strings – Review Lab assignments
Announcements Electrostatics – Potential worksheet is due tomorrow [All materials are posted online under the electromagnetism post] Electrostatics Quiz.
CS1110 Lec Oct 2010 More on Recursion
COMS S1007 Object-Oriented Programming and Design in Java
Recursion.
Announcements & review
Beginning C for Engineers
C-to-LC3 Compiler Over the course of the next two weeks, you will build a program that will compile C code to LC-3 assembly language Don't panic! You.
Announcements Class is full! Sorry... :-(
Homework Starting K&R Chapter 5 Good tutorial on pointers
Announcements Homework #1 will be posted on course website after class
Dbas.
Strings and Pointer Arrays
Hundred Dollar Questions
Announcements Homework #2 scores in Blackboard
EECE.3170 Microprocessor Systems Design I
Exam 2 Exam 2 Regrading Average: 69 TA: Fardad
Functions Extra Examples.
EECE.2160 ECE Application Programming
Announcements HW #1 - graded HW and solutions returned now
No Warm-Up 5/15/17 Happy Monday!  We have 9 school days left this year! (and 1 more Monday after today!) You can choose your seat today; if you move.
A simple function.
Character Arrays char string1[] = “first”;
No Warm-Up 5/19/17 Happy Friday!  We have 5 school days left this year! You can choose your seat today; if you move the seats around, please put them.
IPC144 Introduction to Programming Using C Week 5 – Lesson 1
EECE.2160 ECE Application Programming
pointer-to-pointer (double pointer)
Bell Schedule for First Two Weeks of School
Rudra Dutta CSC Spring 2007, Section 001
COMS W1004 Introduction to Computer Science
AME Spring Lecture 11 - Thrust and aircraft range
Arrays as pointers and other stuff
Announcements Exam 2 Next Week!! Final Exam :
Presentation transcript:

Announcements Homework #5 due Monday 1:30pm submission instructions will be posted on Piazza GadgetsProduced should be 5,000,000 stop looping when temp goes above 100 Upcoming office hours: Tomorrow: Sheng 12-1:30pm Monday: Chris 11am-12pm 1 1 1 1 1

Schedule Last time: Loops and conditionals (chp. 13); Functions (sec 14.1-14.2) Today: how functions work (sec. 12.5, 14.3) Monday: more on functions Next week: arrays, strings, pointers (chp. 16) 2 2 2 2 2

#include <stdio.h> #include <stdlib.h> int power(int, int); main() { int a = 4, b = 7; int k = power(a, b); printf(“%d\n”, k); } int power(int x, int y) { int i, result; for (i = 0; i < y; i++) { result *= x; return result; 3 3

#include <stdio.h> #include <stdlib.h> int power(int, int); main() { int a = 4, b = 7; int k = power(a, b); printf(“%d\n”, k); } int power(int x, int y) { int i, result; for (i = 0; i < y; i++) { result *= x; return result; Function declaration 4 4

#include <stdio.h> #include <stdlib.h> int power(int, int); main() { int a = 4, b = 7; int k = power(a, b); printf(“%d\n”, k); } int power(int x, int y) { int i, result; for (i = 0; i < y; i++) { result *= x; return result; Function definition x and y are parameters 5 5

#include <stdio.h> #include <stdlib.h> int power(int, int); main() { int a = 4, b = 7; int k = power(a, b); printf(“%d\n”, k); } int power(int x, int y) { int i, result; for (i = 0; i < y; i++) { result *= x; return result; Function call a and b are arguments 6 6