New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Note for ELET 2300 with Professor Talusani at UH review guide final


Note for ELET 2300 with Professor Talusani at UH review guide final

Marketplace > University of Houston > Note for ELET 2300 with Professor Talusani at UH review guide final

No professor available

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

No professor available
Class Notes
25 ?




Popular in Course

Popular in Department

This 15 page Class Notes was uploaded by an elite notetaker on Friday February 6, 2015. The Class Notes belongs to a course at University of Houston taught by a professor in Fall. Since its upload, it has received 29 views.

Similar to Course at UH


Reviews for Note for ELET 2300 with Professor Talusani at UH review guide final


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 02/06/15
ELET 2300 Review Guide for Final Summer 2014 Multiple Choice Identiij the choice that best completes the statement or answers the question 1 10 11 Programs written in lowlevel languages usually execute than programs written in highlevel languages a more accurately c faster b less accurately d slower An algorithm is a stepbystep sequence of if that describes how a computation is to be performed a data c objects b instructions d classes When Englishlike phrases are used to describe an algorithm the processing steps the description is called a a formula c b a owchart a program d pseudocode To generate a program that can be executed by the computer requires that the C program which is referred to as a source program be translated into the computer s a data c objects b machine language d classes In C modules can be either if or functions a classes c objects b methods d procedures The main function is referred to as an 77 function because it tells the other modules the sequence in which they are to execute a control c driver b executive d key Data transmitted to a function at runtime is referred to as an if of the function a dimension c header b parameter d argument The include preprocessor command causes the contents of the named le such as the iostream le to be if wherever the include command appears in the program a executed c inserted b compiled d replaced A programming language s if is the set of rules for formulating statements that are grammatically correct for the language a syntax c dictionary b namespace d format A data if is de ned as a set of values and a set of operations that can be applied to these values a type c base b set d dictionary An if value consists of digits only and can optionally be preceded by a plus or minus sign a integer c oatingpoint b char d signed 12 13 14 15 16 17 18 19 20 21 22 23 24 25 The backslash is referred to as the character a tab c escape b quotient d separator A float value is sometimes referred to as a 77 number a singleprecision c binary b doubleprecision d decimal The value of 1625e3 is if a 001625 c 1625 b 162500 d 1625000 Dividing the integer 15 by the integer 2 yields the result if a 7 c 7500 b 7 5 d 152 An if is any combination of operators and operands that can be evaluated to yield a value a eXpression c statement b block d operation An eXpression containing integer and oatingpoint values is called a if eXpression a whole c mixedmode b standard d real In highlevel languages like C a aliases c b references d 7 are used in place of actual memory addresses virtual addresses symbolic names A variable name must begin with if a a letter or an underscore c b a letter or a number d an upper case letter a lower case letter if statements are used to force the compiler to reserve enough physical memory storage for each variable a Initialization c Declamation b Assignment d De nition All operands used in an eXpression must if before the eXpression is evaluated a have values assigned to them c be parameterized b be simpli ed d be printed out If 10 is an integer and d is a doubleprecision number the evaluation of the eXpression 10 d is an if value a integer c real b oat d doubleprecision When the operator appears before a variable it is called an increment operator a leading c ordered b pre X d post X If n is initialized to the value 5 the eXpression n changes the value of n to if a 1 c 5 b 4 d 6 The data type returned by abs x is if a real c integer 26 27 28 29 30 31 32 33 34 35 36 37 38 b oat d the same data type as X The value ofpow x1 x2 is if a x1 raised to the x2 power c the square ofxl the square of x2 b x2 raised to the x1 power d x1 x2 The cin object is used to enter data into a program while it is if a compiling c interpreting b running d loading When a cout statement prints a string that tells the person at the terminal what should be typed the output string used in this manner is called an a prompt c interrupt b checkpoint d pause The cin eXtraction operation if data type conversions a always makes the correct c can make some b can make no d makes only integer to oat The const quali er speci es that the declared identi er is readonly after it is if a de ned c edited b initialized d validated Using letters is customary in C to make const identi ers easy to identify a lowercase c bold b italic d uppercase The eXtraction operator used with ci n is a ltlt c b gtgt 1 ltgt One of the most common C programming errors is forgetting to values for all variables that are used in an eXpression a assign or initialize c compute b read in d parameterize A if relational eXpression consists of a relational operator connecting two variable andor constant operands a standard c single b default d simple Like all C expressions relational eXpressions are evaluated to yield a if result a singleprecision c Boolean b doubleprecision d numerical The value of a relational eXpression such as hour 5 gt 4 0 depends on the if stored in the variable hours a condition c value b sign d relationship If an eXpression is false to begin with then i expres 5 ion is true and evaluates to a value of if a 0 c 2 b 1 d 3 Many if numbers cannot be represented exactly in binary form using a nite number of bits 39 40 41 42 43 44 45 46 47 48 49 50 a small c integer b large d decimal Using the abs function requires including the if header le a iostream c Cmath b sy s t em d mat h Using to enclose a set of statements creates a single block of statements a semicolons c parentheses b colons d braces C treats any nonzero value as if a true b false c either true or false d None of the above because you cannot make a general statement about this In a C program statement indentation is if as far as the compiler is concerned a required c irrelevant b invalid d standardized In an if else chain the nal else is if a a default or catchall case c required b recommended d notused if case labels may be contained within a switch statement a Up to l c Up to 100 b Up to 10 d Any number of If break statements are omitted from a switch statement 7 cas es following the matching case value are executed a no c all b some d two Character data types are if converted to integers in an eXpression a always c usually b sometimes d never It is if to terminate the last case in a switch statement with a break a required c a syntaX error b mandatory d not necessary The whil e statement literally loops back on itself to recheck the eXpression until 77 a the program is terminated c instructed to stop b it evaluates to zero d new data is entered It is the responsibility of the if to ensure that the tested eXpression is changed in a way that ultimately leads to a normal eXit from a while loop a user c programmer b computer operator d compiler An if loop is one that never ends a broken c variablecondition b in nite d xedcount 51 52 53 54 55 56 57 58 59 60 61 62 63 In a if loop a counter is used to control the number of loop iterations a variablecondition c xedcount b discrete d default Sentinel values must be selected so as not to con ict with if a legitimate data values c other sentinels b program logic d stored data Both the for and whi le statements are if loops a nested c pretest b inner d outer A semicolon with nothing preceding it is called an if statement a null c blank b empty d stop The if statement performs the same function as the whi le statement but uses a different form a i f c c o n t i n u e b i f el 5 e d f or Within the parentheses of the f or statement are if items separated by semicolons a two c four b three d ve The f or statement ensures only that all eXpressions in the initializing list are executed if a once c b twice each time through the loop d until a break occurs Omitting the tested eXpression from a f or loop results in if a a crashed program c a read error b a print error d an in nite loop A continue statement inside a for statement causes control to be passed to a the end of the current iteration c the altering list b the statement after the end of the loop d an input statement A loop contained within another loop is called a if loop a secondary c replacement b nested d virtual All statements in a Clo while loop are executed at least a once c three times b twice d four times The if statement is particularly useful in ltering userentered input and providing validity checks a i f c do wh i l e b f o r d whi l e Checking to see that a user enters an identi cation number within a speci ed range is called if a debugging c b validity checking d tracing error checking 64 66 67 68 69 70 71 72 73 A do while statement with an expression that always evaluates to 1 causes an statement is encountered within the loop a compile error c in nite loop b logic error d program termination 7 unless a break Consider the following do whi le loop whose job is to check for a valid customer identi cation number between the numbers 100 and 1999 do i cout ltlt quotnEnter an identification number quot cin gtgt idNum while Missing expression goes here Which of the following is the correct missing expression a idNum gt 100 ampamp idNum lt 1999 b idNum lt 100 H gt 1999 c idNum lt 100 H idNum l 2000 d idNum lt 100 l l idNum gt 1999 The declaration statement for a function is referred to as a function if a speci cation c declaration b initialization d prototype The parentheses following a function call enclose i a the number of function variables c the data type of function variables b data passed to the function d the processing instructions The variable names in the parentheses of a called function are arguments that provide if to the called function a references c values b linkages d precision The argument names in a function header are referred to as if a formal parameters c passed data b input data d function components Placement of the main function de nition before other function de nitions is if a forbidden c recommended b required d of no importance A function returning a value must specify in its header line the if of the value that will be returned a size c address b data type d use After a value is returned from a called function program control reverts to the a compiler c inline function b called function d calling function The value returned by a called function is if converted to the data type declared in the function declaration a usually c conditionally b always d never 74 75 76 77 78 79 80 81 82 83 84 Telling the C compiler that a function is 77 causes a copy of the function code to be placed in the program at the point where the function is called a inline c a called function b online d a calling function A variable with a if is simply one that has had storage locations set aside for it by a declaration statement made Within a function body a pass by value c local scope b pass by reference d global scope The scope of a variable is determined by the placement of the if statement that reserves storage for it a assignment c comparison b reservation d de nition When the scope resolution operator is used before a variable name the compiler is instructed to use an if variable a integer c b global d local character The time dimension of a variable s scope is referred to as the variable s if a execution time c lifetime b compile time d processing time A local variable that is declared as if causes the program to keep the variable and its latest value even when the function that declared it is nished executing a auto c extern b static d register Once a global variable is created it eXists until if a control is returned to the calling function b the program in which it is declared is nished running c control is returned to the called function d the computer is turned off If an if technique is not used rand will always produce the same series of random numbers a randomization c seeding b optimizing d ef cient A onedimensional array is a list of related values with the same if that is stored using a single group name a size c value b data type d offset The statements const int NUMELS 4 and char code NUMELS create an array with storage reserved for if a one byte c four characters b four bytes d four words If an array is declared with the statements const int AA 3 and double arrayA AA the indeX of the last element in the array is if a 0 c2 b1 d3 85 86 87 88 89 90 91 92 93 94 95 96 97 Any expression that evaluates to an 77 may be used as a subscript a integer c scalar b constant d offset The statement cin gtgt grade 4 gtgt prices 6 causes iii values to be read and stored a 2 c 6 b 4 d 10 Onedimensional arrays are examples of an if type a composed c structured b primitive d atomic Consider the declarations const int ARRAYSIZE 7 and double length ARRAYSIZE 7 8 6 4 4 9 1 1 2 How many elements will be initialized to zero a none c two b one d three A Cstring is terminated with a the newline character c b the null character d a square bracket a semicolon When passing an array to a called function the function receives array a a copy of the c the rst element of the b selected elements of the d access to the actual If a twodimensional array is initialized within a declaration statement the if can be omitted a outer braces c commas b inner braces d array elements The initialization of a twodimensional array is done in if order a page c row b column d data element If a nested loop is used to process a twodimensional array the inner loop corresponds to 77 elements a row c data b page d column Assuming four bytes for an int and a column size of4 if val is an int array the array element val 1 3 is located at an offset ofii bytes from the start of the array a 4 c 16 b 12 d 28 A siXdimensional array can be viewed as a mathematical ntuple of order if a ve c seven b siX d ten Many compilers automatically set all elements of integervalued and realvalued arrays to if a blanks c null b zeros d ones A linear search is also known as an 77 search a ordered c selection b binary d sequential 98 99 100 101 102 103 104 105 106 107 108 109 110 In a bubble sort on each pass through the list the largest element 77 a is eliminated c rises to the top of the list b sinks to the bottom of the list d is combined with the neXt largest Every variable has three major items associated with it the value stored in the variable the number of bytes reserved for the variable and the bytes 77 a precision c accuracy b size d address The address of a variable is the memory location of the if byte reserved for the variable a rst c middle b last d largest The number of bytes required for an integer pointer is if a one c eight b four d compilerdependent Pointers are simply if that are used to store the addresses of other variables a prototypes c variables b data types d addresses Using a pointer to nd the value of a variable is called if a pointer arithmetic c indirect addressing b tracing a pointer d tracing a value C requires that when we declare a pointer variable we also specify the if of the variable that is pointed to a value c size b address d data type For dynamic allocation of memory to create new variables as a program is running pointers are 7 a required c not allowed b helpful d allowed A reference is a pointer with if capabilities a eXpanded c unlimited b restricted d computational Using a reference to access the value of a variable without the need for eXplicitly using the indirection operator symbol is referred to as an if a automatic access c b quick lookup d variable access automatic dereference If grade is a singledimension array containing ve integers and there are four bytes per integer ampgrade 3 is computed as if a ampgrade3 4 c ampgrade0 4 b ampgrade04 d ampgrade0 3 4 The 1 in the eXpression gPtr 1 is an if a word c offset b byte d scale When an offset is added to a pointer the address in the pointer is a not changed c eliminated 111 112 113 114 115 116 117 118 119 120 121 122 123 b temporarily changed d overwritten For each array created the name of the array becomes the name of the pointer constant created by the compiler for the array and the if of the rst location reserved for the array is stored in this pointer a offset c starting address b byte count d offset address The purpose of an array name is to if the beginning of the array correctly a assign c offset b declare d locate If grade is an array trying to store its address using the expression ampgrade results in a a program crash c compiler error b normal execution d scaling error Under a dynamic allocation scheme the amount of storage to be allocated is determined and adjusted if a at compile time c when a program error occurs b at runtime d interactively by the user Dynamic storage requests for scalar variables or arrays are made if a automatically by the compiler b interactively by the user c as part of a declaration or assignment statement d in special functions The manipulation of addresses using pointers if knowledge of the actual addresses a requires c often requires b generally does not require d never requires Adding 1 to a pointer causes the pointer to point to the if a neXt element of the type pointed to c neXt byte b rst element of the type pointed to d neXt block EXplicitly passing addresses to a function using the address operator effectively is an if a pass by value c pointer initialization b pass by reference d automatic dereference When an array is passed to a function its 77 is the only item actually passed a value c address b data type d offset A pointer 77 included as a parameter in a function header a can not be c should not be b can be d is rarely To store and retrieve data outside a C program two things are needed a le and an if a storage device c le stream object b buffer d IO command The stored data in a program le is the program code that becomes input data to the C 77 a interpreter c program b compiler d module Each le has a unique le name referred to as the le s if 10 124 125 126 127 128 129 130 131 132 133 134 135 a external name c label b name d mnemonic Each computer operating system has its own speci cations as to the maximum number of if permitted for an eXtemal lename a bits c words b bytes d characters A le stream that receives or reads data from a le to a program is called an if a input le stream c input command b input data path d read statement TeXt les are also known as if a binarybased les c IO les b characterbased les d stream objects The advantage of binarybased les is if a accuracy c compactness b ease ofreading d speed of access For each le that a program uses a distinct if must be created a path mode c transmission path b IO stream object d le stream object Opening a le connects each le stream object to a speci c if a storage device c register b eXtemal le name d storage location A stream is a oneway transmission of if between a source and a destination a bits c bytes b characters d words File stream objects connect a program to a if a keyboard c storage device b terminal screen d le The classes if stream and of stream are made available to a program by inclusion of the if header le a fstream c iofstream b iostream d stream The if method is used to check that a le has been successfully opened a eof c fai1 b good 1 bad In declaring and initializing a string variable for use in an open method the variable must represent an a array c string b structure d Cstring When a string object is used as opposed to a string literal the variable name 7 enclosed Within double quotes in the open method call a is not c is often b is d is rarely 11 136 137 138 139 140 141 142 143 144 145 146 147 148 The operating system will 77 close any open les existing at the end of program execution a sometimes c automatically b usually d not Reading data from a characterbased le is almost identical to reading data from a standard keyboard except that the cin object is replaced by the object declared in the program a fstream c iostream b ifstream d ostream The input statement inFile gtgt descrip gtgt price will read the next items in the le a two c four b three d ve The standard input le is usually a if a printer c modem b terminal d keyboard The error reporting stream is automatically connected to the stream object named 77 a Ci n c cer r b cont d All ofthe above The standard output stream if is connected to the standard output device a Ci n c cer r b c C ut d c 1 o g The only stream method that uses the data le s external name is the 77 method a open c bad b close d fai1 Data members of a class are also known as 7 a instance variables c b data elements d manipulators initializers The private access designation used in C classes restricts a user from seeing how the data is actually stored and is referred to as data a security c enforcement b protection d hiding The class if section is where the member methods declared in the declaration section are written to permit the initialization assignment and display capabilities implied by their names a constructor c initialization b assignment d implementation The if operator is used to show a function s membership in a class a insertion c scope resolution b assignment d inclusion Class functions declared as public if be called by any objects and functions not in the class a can c must only b cannot d should rarely When a new object is de ned memory is allocated for the object and its data members are initialized automatically by a call to the class if method 12 149 150 151 152 153 154 155 156 157 158 159 160 161 constructor extension a implementation c b declaration d If a class designates all of its data members as private and all of its member functions as public we must rely on if to access data members a scope resolution operators c assignment statements b member functions d equivalence statements An 77 consists of a class s public member method declarations and any supporting comments a interface c environment b speci cation d component Objects have the same relationship to classes as if do to C builtin data types a constants c instances b variables d cases A class 7 consists of the operations permitted to be performed on an object s data members a instantiation c behavior b environment d state If no constructor is provided in a class de nition the compiler will if a supply a stub c issue an error message b do nothing d supply a donothing default constructor When a constructor function is used in a declaration parentheses should be included for a zero parameter constructor a always c usually b never d rarely Date c Date 4 1 2 O O 9 is a valid 77 language declaration for an object ofa class named Date a C c assembler b C d machine C constructors may be if a overloaded c aliased b classes d interfaces Constructors may have which of the following attributes a default arguments c inline b overloading d All of the above There can be if destructor functions per class a one c three b two d any number of A mutator method if an object s data values a instantiates c destroys b de nes d changes Functions that change an object s data values are commonly referred to as if a accessor functions c mutator functions b destructive functions d nonmember functions The term information hiding refers to the if and hiding of all implementation details 13 162 163 164 165 166 167 168 169 170 171 172 173 a encryption c encapsulation b translation d destruction Regarding an object de ne the properties of interest a attributes c methods b behaviors d members The if class provides a set of methods that include easy insertion and removal of characters from a string a char c exception b I S 0 d s t r i n g The if character in a string is referred to as both the character s indeX value and its offset value a rst c middle b last d largest Pressing the Enter key at the terminal generates a newline character n which is interpreted by getline as if a the end of data input c the endofline entry b the end of a block of data d a keyboard error On almost all computer systems newly entered data is stored in a temporary holding area called a if a register c buffer b cell d memory location The value returned by the method call Hello World l length is if a 10 c 14 b 12 d 21 Each character in a string is stored in using either the ASCII or Unicode code a binary c octal b hexadecimal d decimal The if function returns the neXt character on the stream but does not remove it from the stream s buffer a peek c get b put d putback The putback function places a character back on the stream so that it will be the 7 character read a rst c neXt b last d neXttolast One way to prevent the Enter key from being accepted as a legitimate character when using the get method is to follow the cin get input with a call to 7 a cinpeek c coutput b cinputback d cinignore The rst step in the input data validation process for numerical data is to ensure that the data is if a of the correct length c contained within one le b complete d of the correct type A string is stored as an array of characters terminated by a special endofstring marker called if a the newline character c a sentinel b the NULL character d an endof le character 14 174 175 176 177 178 The method 77 returns the neXt character from the input stream without extracting the character from the stream a cinget1ine c Cinget b cinput d cinpeek The method if pushes character values back onto the input stream a Cinignore c Cinputback b cinput d cinpeek The if function returns a nonzero number if the character is a letter otherwise returns a zero a isupperchar c isdigitchar b islowerchar d isalphachar The if function returns a nonzero number if the character is a letter or a digit otherwise it returns a zero a isalnumchar c isdigitchar b islowerchar d isalphachar tolower is a 77 function a string conversion c string library b character library d string 15


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Allison Fischer University of Alabama

"I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over $600 per month. I LOVE StudySoup!"

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.