# Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

45 Pages

### CS 1121_Spring_2011_Lecture7_BB

Course: CSCI 1121, Fall 2011
School: GWU
Rating:

Word Count: 1665

#### Document Preview

Pointersandarrays CS1121IntroductiontoCComputing ContinueOVERVIEWofC Lecture7 FunctionsinC(Contd.) Outline Functions callbyvalue callbyreference witharrayarguments Functionswithrecursivecalls Factorial,Sum Recursivesearchinastring POINTERS Pointersareconfusing Theyareveryusefulinmanydifferentways (e.g.withpointerswecaneffectivelyreturnmore thanonethingfromafunction) Arraysareaformofpointer...

Register Now

#### Unformatted Document Excerpt

Coursehero >> District of Columbia >> GWU >> CSCI 1121

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

GWU - CSCI - 1121
CS1121IntroductiontoCComputingContinueOVERVIEWofCLecture8FunctionsinC(Contd.)OutlineFunctionscallbyvaluecallbyreferencewitharrayarguments Pointersandarrays FunctionswithrecursivecallsFactorial,SumRecursivesearchinastringFunctionsinC(Contd.)O
GWU - CSCI - 1121
CS1121 Introduction to C ComputingOverview of Computers andProgrammingOverview of Computers and Programming(Outline)Computer OrganizationCPUMemoryData representationMachine Language / High Level LanguageProgram flow and executionSoftware develo
GWU - CSCI - 1121
Object OrientedProgrammingand MATLABMatlab programming paradiamsupports OOP programming Matlab is primarily procedural - also supportsOOP In procedural the focus is on the functions(procedures) In OOP the focus is on OBJECS as the namesuggests.
GWU - CSCI - 1121
CS1121 Introduction to C ComputingContinue OVERVIEW of CLecture 9Outline Command line arguments review Structures in CCommand lineargumentsBy convention, main is called with two arguments int main(int argc, char *argv[]) argc (argument count) is
GWU - CSCI - 1121
CS1121 Introduction to C ComputingContinue OVERVIEW of CLecture 10OutlineCommand line arguments reviewStructures in C (Contd.)Functions with structures as argumentsFunctions with two dimensional arrays asargumentsCommand Line Arguments int main(
GWU - CSCI - 1121
Midterm2 ReviewSample QuestionsWhat is the output of the following program:#include &lt;stdio.h&gt;int main () cfw_int nn = 5,k;/printf(&quot;How many numbers? &quot;);/scanf(&quot;0&quot;,&amp;nn);printf(&quot;Here is a Table of 0 Numbers\n&quot;,nn);int *ntable = (int *) calloc (nn,s
GWU - CSCI - 1132
Programming Assignment 2 (10%)Fall, 2011Due Date: October 11Writea program to construct a Binary Tree from the list of words. From your input file,the first word is root of your binary tree.* The left subtree of a node contains only nodes with keys
GWU - CSCI - 1132
THE GEORGE WASHINGTON UNIVERSITYSchool of Engineering and Applied ScienceDepartment of Computer ScienceCSci 1132 Data Structure and Software DesignFall 2011InstructorContactInfoOfficeHoursMain Text:Haya Bragg: Email: hayab@gwu.eduPhone (c) 7
GWU - CSCI - 1132
CSci 1132Data Structures,Algorithms &amp;Software Principlesin CFall 2011CS 1031CSci 1132Data Structures, Algorithms &amp;Software Principles in CFall 2011Requirements 4 programming assignments @5% (3-weeks to work on)10% (3-weeks to work on)15% (
GWU - CSCI - 1132
Lecture 2Review Using Big(O) Software Principles in C Pointers Memory allocation User defined datatype - StructuresData Structure (Chapter 2) Linked ListCS 1031Arrays or Linked List ? Application dependent Big(O) used as a tool inanalyzing t
GWU - CSCI - 1132
Lecture 3 Complexity (Chapter 6)Analysis of sequential search More Linked ListPassing a list by reference Recursion (Chapter 3)CS 1031Midterm1 on 10.13.10Complexity (Chapter 6) How many resources will it take to solve aproblem of a given size?
GWU - CSCI - 1132
Chapter 4Modularity and Data Abstraction-We will look at a Priority Queue ADT- Build a module with the PQ ADT- Use the module to sort- Show two different implementationshidden from the users1ModularitySplits a large program into smaller modules
GWU - CSCI - 1132
Lecture 5Trees (Chapter 9) Trees General definitions Binary Search Tree Complexity of Binary Search TreeCS 1031TreesTrees are one of the most important datastructures.Trees provide natural representation formany kinds of data that occure inapp
GWU - CSCI - 1132
Lecture 6Trees Contd. (Chapter 9) Trees Binary Search Tree Complexity of Binary Search TreeCS 1031Typical Binary Tree Code in CIn C or C+, the binary tree is built with anode type like this.struct node cfw_int data;struct node* left;struct no
GWU - CSCI - 1132
Lecture 7 Complexity of Searchingwith BST Binary heaps Midterm1 reviewCS 1031Complexity of Searching with BSTTheorem: A full BST of height h has 2h+1- 1 nodesSn = A1*(1-2n)/(1-2)Sh = A1*(1-2h+1)/(1-2)=2h+1 -1h=0;h=1;h=2;h=3;A1A2A3A4=1=
GWU - CSCI - 1132
Lecture 8 Binary heapsCS 1031Binary heapsA binary heap (often just referred to as a heap) is a special kind ofbalanced binary tree.The tree satisfies two invariants: The node at the top (root) of the tree has minimum or maximumpriority. The diff
GWU - CSCI - 1132
Lecture 10Chapter 13SortingMIDTERM2date 11/17/11CS 1032void isort(float arr[], int n);int fmin(float arr[], int b, int n);Selection Sort Arrayint main(void) cfw_void ssort(float arr[], int n)float arr1[5] = cfw_4.3, 6.7, 2.8, 8.9, 1.0; int i,
GWU - CSCI - 1132
TreesData Structures in CSession 5Nima BariTrees Tree nodes contain two or more links All other data structures we have discussedonly contain one Binary trees All nodes contain two links None, one, or both of which may be NULL The root node is
GWU - CSCI - 1132
Da ta S tructureLinke d Lis tNima Ba riCS 103Dyna mic Da ta S tructure s Da ta s tructure s tha t grow a nd s hrink during e xe cution Linke d lis ts Allow ins e rtions a nd re mova ls a nywhe re S ta cks Allow ins e rtions a nd re mova ls only a
GWU - CSCI - 1132
Descriptions of a few functions for file manipulation. This is not exhaustive. There are othermethods for reading and writing from and two a file.fgetsIn order to read from a file or write to a file, you must have a file pointer pointing to the file th
GWU - CSCI - 1132
GWU - CSCI - 1132
FROM: ayoussefDATE: 09-15-2005 SUBJECT: Do your homeworkBODY:My advice to you is to start to do your programming assignment 1 today. -AY#FROM: kormanDATE: 09-16-2005 SUBJECT: cs103BODY:listen to your professor of cs103, and follow his advice.Yo
GWU - CSCI - 1132
LIST-MESSAGES-BY-DATELIST-MESSAGES-FROM ayoussefDISPLAY 5DELETE-MOST-RECENT-MESSAGEDISPLAY 3DISPLAY 6LIST-MESSAGES-FROM dean
GWU - CSCI - 1132
GWU - ECE - 2115
1. Introduction:The purpose of this experiment was to understand the i-v characteristic curve ofdifferent types of diodes. In order to achieve this, first the forward and reverse resistanceof different types of diodes was determined by using Keithley M
GWU - ECE - 2115
Joshua DeanExperiment 6BJT: Designing &amp; Building a CE AmplifierMarch 29, 2011The George Washington UniversitySchool of Engineering and Applied ScienceECE 2115Engineering ElectronicsGTA: Bowei ZhangLab Partners: Berk Bozoklar, Stephen JooIntroduc
GWU - ECE - 2115
1. Introduction:This experiment is to analyzes the BJT transistor, the base-emitter pn-junction and thebase-collector pn-junction, by using the Tektronix Model 571 Curve Tracer. Thisexperiment also characterizes the transistor by using a power supply a
GWU - ECE - 2115
Joshua DeanExperiment 4Characterization of an NPN Bipolar Junction TransistorMarch 2, 2011The George Washington UniversitySchool of Engineering and Applied ScienceECE 2115Engineering ElectronicsGTA: Bowei ZhangLab Partner: Berk BozoklarIntroduct
GWU - ECE - 2115
1. Introduction:The BJT properties were observed through this experiment. The voltage gainamplifiers and the Beta Stabilized Biasing Network operating point werecompared and measured with PSPICE values.2. Background information:V =IREquation Ohm's L
GWU - ECE - 2115
Joshua DeanBerk BozoklarExperiment 2: Solid State Diodes Applications 1January 26, 2011The George Washington UniversitySchool of Engineering and Applied ScienceECE 2115Engineering ElectronicsLab Section 31Mazdak TaghioskoueiIntroductionThe obje
GWU - ECE - 2115
Joshua DeanBerk BozoklarExperiment 2: Diode Application II: Biomedical ApplicationsFebruary 2, 2011The George Washington UniversitySchool of Engineering and Applied ScienceECE 2115Engineering ElectronicsLab Section 31Bowu ZhangIntroduction:The
GWU - ECE - 2115
Joshua DeanBerk BozoklarCharacterization of an NPN Bipolar Junction Transistor (BJT)March 1, 2011The George Washington UniversitySchool of Engineering and Applied ScienceECE 2115Engineering ElectronicsLab Section 31Bowei ZhangIntroductionThe ob
GWU - ECE - 2115
Joshua DeanECE 2115-31 PRELABFebruary 2, 2011(a) From the spec sheet, for the thermistor with your model #, populate the following tableCharacteristicValue +unitResistance at 25C3kMax operating temp150 CResistance Ratio9.10
GWU - ECE - 2115
Joshua Dean 3/9/2011PRELAB 5ECE 21151.Equipment List:a. npn BJT 2N3904b. resistorsi. 16k R1ii. 8k R2iii. (2) 1k RC and REc.power supplyd. Keithley 175 DMMe. digital oscilloscopef. function generatorg. breadboard2.IBCalculated ValuesIEI
GWU - ECE - 2115
Zener Diode:VZ, @ IZt1N751AIZt5.1 VZener Impedance20mAMax Regulator Current17 70 mATable 1.2a Spec Sheet ValuesVF (typical)LEDIF3.0 VMV575320 mATable 1.2b Spec Sheet ValuesVF (typical)V. RegulatorIF5.0 VLM7805500 mATable 1.2c Spec
GWU - ECE - 2115
GermaniumSiliconZenerLEDGermaniumSiliconZenerLEDGermaniumSilicon0 mA1 mA2 mA3 mA4 mA5 mA6 mA7 mA8 mA9 mA10 mA11 mA12 mA13 mA1N34A1N40021N752MV57531N34A1N40021N752MV57531N34A1N4002D1(germanium)-.20610.43750.53700.5473
GWU - ECE - 2115
Joshua DeanExperiment 5Biasing an NPN BJT IntroductionMarch 9, 2011The George Washington UniversitySchool of Engineering and Applied ScienceECE 2115Engineering ElectronicsGTA: Bowei ZhangLab Partner: Berk BozoklarIntroductionThe objective of th
GWU - ECE - 2115
Lab#1: Solid State Diodes Testing &amp; CharacterizationPrimary Author: Berk BozoklarLab Partners: Joshua DeanCourse and Section #: ECE 2115 Section 31Instructor Name: Mazdak TaghioskouiDue Date: January 26, 20111. Introduction:The purpose of this expe
GWU - ECE - 2115
1. Introduction:The purpose of this experiment was to learn how to put together a transformersafely by soldering. After that the experiment was mainly about building and testing half,full and bridge rectifier on the transformer and also understanding t
GWU - ECE - 2115
1. Introduction:The main goal of this lab is to understand the i-v characteristic curve of differentdiodes. The forward and reverse resistance of different types of diodes was found byusing Keithley Model 175. The current flow was then found on a testi
GWU - ECE - 2115
GWU - ECE - 2115
Introduction:The purpose of this experiment was to design a common amplifier circuit based off agiven set of specifications and observe its behaviors. The behavior of this circuit was predictedwith both hand calculations and simulations, then it was te
GWU - ECE - 2115
Lab 7: Designing and Measuring a Common-Collector AmplifierDaniel SawyerPartner: Eric HerreraMonday, April 4Introduction:The purpose of this experiment was to design a common amplifier circuit based off agiven set of specifications and observe its b
GWU - ECE - 2115
Joshua DeanExperiment 7Designing and Measuring a Common-Collector AmplifierApril 6, 2011The George Washington UniversitySchool of Engineering and Applied ScienceECE 2115Engineering ElectronicsGTA: Bowei ZhangLab Partners: Berk Bozoklar, Stephen J
GWU - ECE - 2115
Prelab for Lab 2 ECE2115-31Joshua DeanJanuary 26, 2011CharacteristicPrimary VoltageValue +unit115VrmsFrequency60HzSecondary Voltage18VrmsSecondary Current Limit1.5ACalculate Power Limit(secondary V*I limit)Calculate turn ratio (NP/NS)38.1
GWU - ECE - 2115
Voltages for CC amplifierCurrents for CC AmplifierVin vs VoutVin vs Vout (clipped sine wave when vsig is increased to 15V)Iin vs IoutVin Vs IinVout vs Iout
GWU - ECE - 2115
1. Introduction:The purpose of this report is to detail essential procedures and background informationpertaining to the performance of experiments involving: color coded resistors, Solderlessbreadboards, and PSPICE simulation.Cadence PSPICE Simulatio
GWU - ECE - 2115
TO: Qianyi ZhaoFROM: Joshua DeanCC: Professor FarmerDATE: October 28, 2010RE: Lab #7: DC Operational Amplifiers- ApplicationsI. ORGANIZATION OF LAB:On 10/21/2010 Joshua Dean and Eric Herrera performed GWU-ECE 11 Lab Experiment#7: DC Operational Amp
GWU - ECE - 2115
TO: Qianyi ZhaoFROM: Joshua DeanCC: Professor FarmerDATE: November 11, 2010RE: Lab #9: Meter Responses, Waveforms and AC ThveninI. ORGANIZATION OF MEMORANDUM:Experiment #9.1: (1) simple circuit in which a variable (changing) resistor is set up inse
GWU - ECE - 11
1. IntroductionThe purpose of this report is to give methods for gaining experience intesting voltage, current, and power across and through DC series, parallel, andseries-parallel combination circuits. This is accomplished three ways: byimplementing
GWU - ECE - 11
1. IntroductionThe purpose of this experiment was to demonstrate voltage division, circuitreduction, and node voltage analysis. This was accomplished by constructing andanalyzing a voltage ladder circuit, a series / parallel circuits, and a Wheatstone
GWU - ECE - 11
1. OBJECTIVESThe objective of this experiment was to find the Thevenin equivalencies forthree separate circuits. The circuits and their VTH, ISC, and RTH were analyzedusing PSPICE, hand calculations, and DMM use on breadboard reproductions.2. BACKGROU
GWU - ECE - 11
1. IntroductionThe objective of this lab was to gain experience with AC signals and circuitmeasurements. This was accomplished by generating AC signals with a function generators andthen measuring this signals with both digital and analog oscilloscopes
GWU - ECE - 11
ECE 12 Midterm Exam Closed Book Problem #1.(a) Sketch the time function f(t) = 2t u(t) - t u(t-2) - t u(t+4)(b) Sketch f(2 - t)Problem #2. Using Laplace transforms, solve the differential equation( D2 + 6D + 25 ) y(t) = ( D + 2) f(t)y(0-) = Dy(0-)
GWU - ECE - 11
ECE 12 Midterm Exam Closed Book 2008 October 23Problem #1.A function f(t) is f(t) = t u(t) - t u(t - 2) + (3 - t)u(t - 2)(a) Sketch f(t).(b) Find the Laplace transform of f(t).Hint: Find the Laplace transform of df/dt first.Problem #2. Find the in
GWU - ECE - 2140
The George Washington UniversitySchool of Engineering and Applied ScienceExperiment 8 Seven Segment DecoderBy: Berk BozoklarLab Partners: Joshua DeanEric HerreraT.A: Jie ChenClass name &amp; Section no: ECE 2140/32Due Date: February 23, 2011Abstract:
GWU - ECE - 2140