2 Pages

notes

Course: CS 242, Fall 2009
School: CSU LA
Rating:
 
 
 
 
 

Word Count: 268

Document Preview

Renne Alinn Herrera 7.18.2007 Functions Functions: executes a certain task when indicated. Syntax: returntype Definitions Returnytpe: once the function executes, it returns the "type" of answer labeled. Another option can be `void' which does nothing in return. Examples: char, int, float etc.... Functionname: it is the name of the function assigned. Note: usually the name of the function relates...

Register Now

Unformatted Document Excerpt

Coursehero >> California >> CSU LA >> CS 242

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.
Renne Alinn Herrera 7.18.2007 Functions Functions: executes a certain task when indicated. Syntax: returntype Definitions Returnytpe: once the function executes, it returns the "type" of answer labeled. Another option can be `void' which does nothing in return. Examples: char, int, float etc.... Functionname: it is the name of the function assigned. Note: usually the name of the function relates to what it actually does or a meaningful name. Parameter list: designates the type of variable and the name given. Example: char wateva Function example #include <stdio.h> int add(int a, int b){ int result = a + b; result = a + b; return result; //or can write // return result; main(){ int int int } //all the program example does is there are variables assigned in the main program and when it reaches the `add' function the program will JUMP to the top num1 = 10; = num2 20; sum; note:result must receive appropriate "returntype" functionname(parameter list){ } } void sum = add(num1, num2); NOTE: IF GOING TO COPY/PASTE CODE TRY TO USE A FUNCTION INSTEAD. CAN HAVE THE SAME VARIABLE NAME FOR DIFFERENT FUNCTIONS. Function example #include <stdio.h> #include <math.h> float square(float num){ float answer = num * num; return answer; ) int add(int b){ int answer; a = 40; answer = a + b; return answer; } void main(){ int int int float num1 = 10; num2 = 20; sum; ans...

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:

CSU LA - CS - 242
A function or subroutine, is a portion of code within a larger program, that performs a specific task. A function must be defined before the program calls it. for example: inputs to function int add(int a, int b){ int result = a + b; return result; }
CSU LA - CS - 242
NotesJuan Escobar 8/06/07CS-242Function Prototypes Main () { into i; printf(i); } # include &lt;stdio.h&gt; void print (int); Pointers There are no pointers in Java A pointer is a variable, and a pointer is no more then an address. We don't have to ha
CSU LA - CS - 242
Student: Antonio Castillo Date: July 30, 2007 Agenda Professor Miller talked about the midterm o Average score of midterm was 17 o Standard deviation was of 6% o Reviewed answers for midterm Lecture on Forms o Forms in HTML is how to display input bo
CSU LA - CS - 242
CS242 Class Notes August 13, 2007 Assignment 5 is due next Wednesday (08/22/07). Using structures will give up to 2% extra credit. I/O Files Files are in all capital letters. File has to be a pointer. Put * in front of variable to make
CSU LA - CS - 420
Armando Padilla CS420 Notes Lecture #3 January 18th 2006Main Topic: JavaBeansAgenda: 1) Assign Passwords and Usernames for the `CS' server 2) Review of JavaBeans (example provided) 3) In class Assignment Account Setup and AccessTo access the CS s
CSU LA - CS - 420
Notes for 2/22/06 Class starts with a presentation about Struts. URL for part of the presentation: http:/cs.calstatela.edu/~wiki/index.php/User:Ecruz3/Struts_Presentation Struts homepage: http:/struts.apache.org/What is Struts? An MVC Framework
CSU LA - CS - 120
January 9, 2006 CS 120 Introduction to Website Development Meeting times: Monday 6:10pm-7:50pm Wednesday 6:10pm-8:40pm Instructor: James Miller E-mail: jmiller6@calstatela.edu About Mr. Miller: USC student, pursuing a Ph.D. degree in Computer Science
CSU LA - CS - 120
1/18/2006 Legend: &lt;.&gt; = tag -xyz =attribute Tags covered last week &lt;html&gt; &lt;body&gt; -bgcolor &lt;title&gt; page title &lt;hr&gt; -align: center, left, right &lt;p&gt; &lt;br&gt; new line &lt;i&gt; &lt;b&gt; &lt;font&gt; -size: 1, 2, 3. -color: white, black, #666666, etc. -face: Verdana, etc. &lt;t
CSU LA - CS - 120
By: Khim Khith CS120 Notes January 30, 2006Tables - no required attribute &lt;table&gt; &lt;!- start of table tag -&gt; &lt;tr&gt; &lt;!-define a row -&gt; &lt;td&gt; Hello &lt;/td&gt; &lt;!- &lt;td&gt; define a column -&gt; &lt;td&gt; World! &lt;/td&gt; &lt;td&gt; Foo &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Bar &lt;/td&gt; &lt;td&gt; Compute
CSU LA - CS - 120
Jaime R. Menjivar 02/06/06Class Notes for 02/06/06It is given that one ball is heavier than the rest and the rest weigh the same amount. How do you find the heaviest ball? (You weigh two by two until you find a pair that weighs more. Then you wei
CSU LA - CS - 120
Monday February 22, 2006 Lecture NotesCascading Style Sheet (CSS)CSS is used to control the layout and style of HTML pages &lt;html&gt; &lt;head&gt; &lt;title&gt; CSS Tags &lt;/title&gt; &lt;style type &quot;text/css&quot;&gt; h3 {color:green;} &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;hello&lt;/h1&gt; &lt;h3
CSU LA - CS - 120
CS 120 NOTES FEBRUARY 27, 2006 JAVASCRIPT - Many jobs will require that you have experience in Javascript and/or Java programming. - Java and Javascript are really completely different o Javascript: client side technology; requires other programs to
CSU LA - CS - 490
Program ControlIteration and Recursion; Functions, Procedures and Exception Handlers; Communication and Synchronization Iteration and RecursionIteration: Repetition of a sequence of instructions. Iteration is characterised by a set of
CSU LA - CS - 490
Name: Ramon Quiusky Class: CS 490 Term: Fall 2003 Expression Evaluation, Scope, Parameter Passing, Data Organization, Program Control, Binding Recommended Reading Material 1. Data Structures and Other Objects Using C+, Second Edition by Walter Savitc
CSU LA - CS - 490
.s s s s sCOMPILERS AND INTERPRETERS-CompilerssA compiler is a program thatt reads a program written in one language - the source languageand translates it into an equivalent program in another language -tha target language.-InterpreterssI
CSU LA - CS - 490
Presentation Outline Description: Data types, Data structures and implementation techniques, File organization (eg. sequential, indexed, multilevel) Data Types* Character: a single byte, capable of holding one character in the local character set.
CSU LA - CS - 490
Compilers and InterpretersDiscussion Outline Part I: Front-End I. II. Introduction - definitions, architecture, phases Lexical Analysis - regular expressions - finite automata (NFA, DFA, conversions) Syntax Analysis - context-free grammars - top-dow
CSU LA - CS - 490
PROCESSES Process a program in execution -A process includes: program counter current activity stack temp. data data section global variables -As a process executes, it changes state new: The process is being created. running: Instructions are be
CSU LA - CS - 490
Artificial IntelligenceTarik BookerWhat we will cover.History Artificial Intelligence as Representation and Search Languages used in Artificial Intelligence ApplicationsHistory of Artificial IntelligenceDerives from LogicAristotle Charles Ba
CSU LA - CS - 490
Computer GraphicsRaster Devices TransformationsTarik Booker Areg SarkissianRaster Devices Most displays used for computer graphics are raster displays. The surface of raster displays has a certain number of pixels that it can show, such as
CSU LA - CS - 490
Logic ProgrammingTarik BookerWhat will we cover? Introduction Definitions Predicate Prolog ApplicationsCalculusWhat is Logic Programming? Simplyprogramming that uses a form of symbolic logic (predicate calculus) as a programming langua
Sveriges lantbruksuniversitet - CMPT - 882
p(a|.) p(b|.) p(e|.) p(q|.) p(r|.)p(.|q)0.4 0.6 0 0.2 0.8p(.|r)0.1 0.9 0 0.3 0.7p(.|start)0 0 1.0 1.0 0p(a,q|.) p(b,q|.) p(a,r|.) p(b,r|.) totals input = bbba (q) (r) P(bbba) input = bbba best(q) best(r) input = bbba (q) (r) (q) P(bbba) e
Sveriges lantbruksuniversitet - CMPT - 755
%!PS-Adobe-2.0 %Creator: dvipsk 5.58f Copyright 1986, 1994 Radical Eye Software %Title: CMPT-755-Sarkar-04-3.dvi %Pages: 1 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSCommandLine: /usr/local/bin/dvips -o CMPT-755-Sarkar-04-3.ps %+
Rutgers - PHYSICS - 313
Lecture 1. Relativistic kinematicsProf. Michael Gershenson, Office: Serin Physics 122W Phone 5-3180, E-mail: gersh@physics.rutgers.edu Office hours: Mon. 2:30-3:30 PM and by appointment (e-mailed questions are encouraged) Textbook: A.Beiser, Concept
Rutgers - PHYSICS - 313
Lecture 4. Particle properties of wavesv/c Relativistic mechanics, El.-Mag. (1905) Classical physics Relativistic quantum mechanics (1927-) Quantum mechanics (1920's-) h/sS the action=momentum distance, units g cm2/sOutline: Light: waves vs. p
Rutgers - PHYSICS - 313
Lecture 6. De Broglie WavesOutline: The de Broglie Hypothesis The Davisson-Germer Experiment The Electron Interference ExperimentIs the wave/particle identity crisis only a problem with light, or it is pertinent to objects that seem undeniably
Rutgers - PHYSICS - 313
Lecture 8. The Schrdinger EquationOutline: Ground Energy of a Harmonic Oscillator Uncertainty &quot;energy time&quot; Postulates of Quantum Mechanics The Schrdinger Equation Wave Functions: Probability and NormalizationThe ground state of a quantum ha
Rutgers - PHYSICS - 313
Results of Midterm 1# of students 010203040 Grade A B+ B C+ C D,F5060 Points 76-100 71-76 56-70 51-55 26-50 25708090100 pointsProblem (Doppler)(20) A quasi-stellar object (quasar) exhibits a Doppler shift such that obs - =
Rutgers - PHYSICS - 313
Lecture 12. Quantum Harmonic OscillatorOutline: Finite Potential Well Superposition of Eigenstates: Particle Motion in a Box Quantum Harmonic Oscillator: - Energy Spectrum - Eigenfunctions123Finite Potential Well (bound states) d 2 ( x )
Rutgers - PHYSICS - 313
Lecture 14. Hydrogen AtomAtom is a 3D object, and the electron motion is three-dimensional. We'll start with the simplest case - a hydrogen atom. An electron and a proton (nucleus) are bound by the central-symmetric Coulomb interaction. Because mp&gt;m
Rutgers - PHYSICS - 313
Lecture 15. Angular Momentum, Radiative TransitionsOutline: Energy Eigenfunctions in H Atom (cont'd) Angular Momentum Interaction between Quantum Systems and E.-M. RadiationSummary of Lecture 14Eigenfunctions of bound states in H atom: n ,l
Rutgers - PHYSICS - 313
Lecture 17. Spin, Systems of Many ParticlesOutline: Spin, Stern-Gerlach experiment Systems of indistinguishable particles: fermions and bosons Pauli principle Exchange interaction Many-electron atoms(Modified) Stern-Gerlach ExperimentSpatial
Rutgers - PHYSICS - 313
Lecture 18. Many-Electron Atoms, Periodic TableOutline: Many-electron atoms Periodic Table of elements Characteristic X-ray RadiationMany-Electron AtomsMany-electron atoms: an example of many-body problems. Each electron interacts with both th
Rutgers - PHYSICS - 313
Lecture 23. Origin of Elements in the Universe, Nuclear FusionRadioactive dating Boltzmann Distribution (to be continued later) Nuclear Magnetic Resonance Primordial Nucleosynthesis Stellar Nucleosynthesis Explosive Nucleosynthesis odds and ends14
Rutgers - PHYSICS - 313
Lecture 24. Origin of Elements (cont'd), Nuclear FissionStellar Nucleosynthesis Explosive Nucleosynthesis Fusion Reactor: the Tokamak Nuclear Fission Fission ReactorsStellar Nucleosynthesis up to IronIn stars 12C formation sets the stage for the
Rutgers - PHYSICS - 313
Lecture 25. Boltzmann Statistics&quot;Ludwig Boltzmann, who spent much of his life studying statistical mechanics, died in 1906 by his own hand. Paul Ehrenfest, carrying on his work, died similarly in 1933. Now it is our turn to study statistical mechani
Rutgers - PHYSICS - 313
Lecture 26. Degenerate Fermi GasGround State of a Fermi Gas, Fermi Energy Fermi Velocity, Fermi Momentum, Fermi Pressure Fermi Pressure and Stellar Evolution Non-Zero T, Fermi-Dirac Distribution Specific Heat of Degenerate Fermi GasWhen we consider
Rutgers - PHYSICS - 313
Lecture 27. Blackbody Radiation (Ch. 2 and 9)Bose-Einstein Distribution for Phonons Density of States for Phonons Energy Spectrum of Blackbody Radiation - Rayleigh-Jeans Law - Wien's Law - Stefan-Boltzmann LawWe went full circle: from the mystery o
Rutgers - PHYSICS - 341
quantity GM specific ang. momentum, ell Delta tvalue 39.48 6.28 0units AU^3 yr^2 AU^2 yr^1 yrt (yr)1.510.50-0.5-1-1.5 -1.5-1-0.50 y (AU)0.511.50 0 0 0 0 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.02 0.02 0.0
Rutgers - PHYSICS - 342
standard solar model, adapted from http:/www.sns.ias.edu/~jnb/SNdata/solarmodels.html BS2005(OP) some useful constants k_B 1.3807E16 G 6.6743E08 m_p 1.6726E24 Msun 1.99E+33 Rsun 6.96E+10 radius r/Rsun 0.005 0.010 0.015 0.020 0.025 0.030 0.035 0.040 0
Rutgers - PHYSICS - 541
Spectral Classification of StarsOBAFGKMHottest to Coldest (Temperature sequence) Classification scheme due to Annie Jump Cannon (Harvard) (non-alphabetic ordering merely an historicalaccident)Within each letter class also a numerical class 0-9
Rutgers - PHYSICS - 441
Spectral Classification of StarsOBAFGKMHottest to Coldest (Temperature sequence) Classification scheme due to Annie Jump Cannon (Harvard) (non-alphabetic ordering merely an historicalaccident)Within each letter class also a numerical class 0-9
Rutgers - PHYSICS - 351
Lecture 19 Overview Ch. 4-5List of topics 1. 2. 3. 4. Heat engines Phase transformations of pure substances, Clausius-Clapeyron Eq. van der Waals gases Thermodynamic potentials, chemical reactionsPe = 1-1 2 QC QHHProblem 1 (heat engine)W
Wisc Eau Claire - EDMT - 380
Hearing Impairment Colleen Bender, Morgan Hansen and Michelle Olson Hard of Hearing vs. DeafHard of hearingLevel of hearing loss that makes it difficult though not impossible to comprehend speech via the earDeaf Loss of all ability
Arizona - PLP - 428
1GCGGGCGCAG CGCCGACCTG CTGGTCTGCC ACGACCAGCC GCTGTCGCGG 51 CTGCGCTTCC TCAAGGGCCC GCCGGCGCAC CGGCAGATGG TGCGCAGCGT 101 GCTCGGCGCC TGTGGCATCG CCACCCGCCG CCTGGAAGAG TTCGCGCCGA 151 TGCGCAGTTC CAGCGAGGAA CAGCGCCAGG GCTGGCTGCG TCGCGCCGAA 201 CAGCTCGGCA G
Arizona - PLP - 428
1GAACGGCAAG AACGACAGCT CCGCGCTGGT GGTGGTGGAC GACAAGACCC 51 TGAAGCTCAA GGCCGTGGTC AAGGACCCGC GGCTGATCAC CCCGACCGGT 101 AAGTTCAACG TCTACAACAC CCAGCACGAC GTGTACTGAG ACCCGCGTGC 151 GGGGCACGCC CCGCACGCTC CCCCCTACGA GGAACCGTGA TGAAACCGTA 201 CGCACTGCTT T
Arizona - PLP - 428
1GCGCGCGGCC GATGGATACG CCGAGGTATC CGAGCAACAC CGCACCGAGC 51 AGCAGCAGGC CGGCCAGGGC CATCAGCACC TTGCTATTCA TGGGCAGACC 101 CCTGCTATGC GTCCGGACAG GTCGATGAAC GGAAAATCAC CGGCGATCGC 151 CGATGATCGG AAAAGAAAAA CGGGCGTCTC GCTGTCCGTG TCATGGCCAT 201 ACTCCGGGAC T
UPenn - VHM - 801
01 32 34 202 31 31 003 29 35 604 10 16 605 30 33 306 33 36 307 22 24 208 25 28 309 32 26 -610 20 26 611 30 36 612 20 26 613 24 27 314 24 24 015 31 32 116 30 31 117 15 15 018 32 34 219 23 26 320 23 26 3
Wisconsin - AAE - 374
International Studies &amp; AAE 374 Growth and Development of Nations Lecture 4 15 September 2008 Outline: I. Open up 2x2x1 model to Trade [Appleyard 27-38] A. Predict a pattern of production B. Examine welfare (wage) effects Introduce Factor Endowment b
Wisconsin - AAE - 374
International Studies &amp; AAE 374 Growth and Development of Nations Lecture 5 17 September 2008 Outline:I. A.B.C. II.A. B. C.Open up 2x2x2 model to Trade [Appleyard Chap. 6 &amp; 8] Predict a pattern of production and effects Look at some growth co
Wisconsin - AAE - 374
x 0 1 2 3 4 5 6 7 8 9y 0.00 1.00 1.41 1.73 2.00 2.24 2.45 2.65 2.83 3.00y = x0.53.503.002.502.001.501.000.500.00 0 1 2 3 4 5 6x0.55678910x1 0 1 2 3 4 5x2 0 1 1 2 3 4y 0 2 3 5 7 9x 0 1 2 3 4 5 6 7 8 9y 1 3 5
Wisconsin - AAE - 374
year 2000 2005 2010 2015 2020GDP 5 5.5 6 10 8growth 0.20per year 0.0184 0.0238year 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025t 0 1 2 3 4 5 6 7 8 9 10 11
Wisconsin - AAE - 374
year 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030t 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30Chi
Wisconsin - AAE - 374
Sep. 19 Andrs MoyaAAE374 Discussion Section #3 Visual Representation of Distributions &amp; PS11. Visual Representation of Distributions see stat.xlsHistogram: Graphical display of tabulated frequencies, shown as bars. It shows the number of cases
Wisconsin - AAE - 374
Name GDPpc Growth Food Algeria 5429.83 -1.71 Angola 1781.78 -2.96 Argentina 8781.23 -3.77 Australia 21578.89 -2.04 Austria 23001.22 3.53 Bahrain 12354.97 0.82 Bangladesh 1196.6 3.56 Belgium 23046.69 2.83 Belize 4228.01 7.23 Bolivia 2056.75 2.27 Brazi
Wisconsin - AAE - 374
Oct. 17 Andrs MoyaIAAE374 Discussion Section Exam 1 Review1. Absolute (unconditional) convergence: Consider a group of economies with a production function specified as in the Solow Model. Y = K L1- y = k We know that the growth rate of the stoc
UPenn - VHM - 801
Exercise 12.18-Minitab commands, with comments belowMTB &gt; Retrieving worksheet from file: C:\DATA.AVC\teaching\vhm801\data_txt\Ch12\EX12_018.TXT# Worksheet was saved on Mon Apr 22 2002MTB &gt; Describe 'Scores';SUBC&gt; By 'Lessons';SUBC&gt; GBoxpl
Cal Poly - MTH - 2301
Object: Changement de barme Date: Wed, 29 Nov 2000 18:37:46 -0500 (EST) From: &quot;President de l'AEP&quot; &lt;presaep@step.polymtl.ca&gt; To: marc.bourdeau@courriel.polymtl.ca CC: pierre.lafleur@courriel
UC Davis - LOG - 0031
REGISTRATION FORMSEAFOOD SCIENCE &amp; TECHNOLOGY SOCIETY OF THE AMERICAS 25th Annual SST Conference Holiday Inn Hotel &amp; Suites - Longboat Key, FL October 8-11, 2000(Please print clearly) Name : Address: __ _ _ _ Phone: Email: __ Fax: __Registrati
UC Davis - ATT - 0031
REGISTRATION FORMSEAFOOD SCIENCE &amp; TECHNOLOGY SOCIETY OF THE AMERICAS 25th Annual SST Conference Holiday Inn Hotel &amp; Suites - Longboat Key, FL October 8-11, 2000(Please print clearly) Name : Address: __ _ _ _ Phone: Email: __ Fax: __Registrati
University of Iowa - CS - 185
CS 185, Call-By-Name Functional ProgrammingLast time: eager functional programming with references.Example: we can implement recursive functions using references:let fib = (let fib = mkref 0 in let Fib = lambda n. if n &lt;= 1 then 1