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


by: Trace Mante MD


Trace Mante MD

GPA 3.61


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

Class Notes
25 ?




Popular in Course

Popular in Computer Science and Engineering

This 5 page Class Notes was uploaded by Trace Mante MD on Monday October 26, 2015. The Class Notes belongs to CSCE 206 at University of South Carolina - Columbia taught by Staff in Fall. Since its upload, it has received 26 views. For similar materials see /class/229584/csce-206-university-of-south-carolina-columbia in Computer Science and Engineering at University of South Carolina - Columbia.

Popular in Computer Science and Engineering




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: 10/26/15
True False Comment required 1 In C the variables Alpha ALPHA and AlphA are the same identi er Answer False Explanation C is case sensitive these are different identi ers 2 In C the compiler will infer the type intended for a variable from the context in which the variable occurs Answer False Explanation C requires every identi er to be declared prior to use The type is speci ed in the declaration 3 The range of values for an int variable is from about 0 to 2 billion Answer False Explanation The correct range is about 72 Billion to 2 Billion 4 The names x y and z are satisfactory variable names for the lengths of the legs and hypotenuse of a triangle Answer False Explanation Names should communicate to the human reader the meaning of the value These identi ers do not communicate the meaning of their values 5 Explanation In general assigning a oating point value to an integer variable mostly loses information A warning message or an error message is issued by C compilers 6 C uses only for comments Answer False Explanation C uses comments and here to the end of the line comments 7 A program s comments should connect the program code to the problem being solved Answer True Explanation The purpose of comments in a program is to help the human reader of the code to connect the program to the problem being solved Comments are so important Page 2 there is an aphorism often quoted by expert programmers If the comments and the code disagree then both are probably wrong 8 A program should have a comment on every line Answer False Explanation This would be satisfactory only on a very complicated assembly language program for an inexperienced programmer 9 A computer program is a set of instructions intended for only the computer to follow Answer False Explanation A computer program is also intended for human beings to read and the comments are intended to make this job easier Fill in the blank 1 In C a legal identi ers may contain these kinds of characters Answer Letters digits underscore Explanation Some implementations allow a very few other characters such as 2 In C a variable that has been de ned but not initialized may not be used as an l value or r value Answer rvalue Explanation The value of an uninitialized variable may not be fetched C does not enforce this If an uninitialized variable s value is fetched you get whatever value was left in the memory location by a previous user Note that the value is garbage in the dictionary sense It is not a random value Multiple Choice 1 In C some of the following are legal identifiers Which Why a 9xyz b Xyz c Xyz d xyiz e xyzl Page 3 Anwer a 9xyz no 7 An identi er cannot start with a digit b Xyz yes An identi er may have upper and lower case letters c Xyz no 7 This has an illegal d xyiz yes e xyz no 7 This has an illegal N Which of the following are likely to be poor choices for an identi er in a program Answer a X is too short to adequately describe a real world value b RATE suggests a rate of speed or interest perhaps c data is perhaps a bit generic nevertheless this writer would allow it d iabc is not a word It does not bring anything to this writer s mind e A is too short to adequately describe anything in the real world Explanation The answers to this question are subjective 3 Pick the C keywords out of the following list a While b totaliweight c double d if e numberiofibars Answer Keywords are a while c double and d i f 4 Before a variable in C is used it must be a de ned b initialized c used in some expression d begin with a capital letter e Page 4 contain only letters digits and underscores Answer a de ned 5 A lvalue is a b c d V an expression that can be only be placed on the left of any operator such as etc assigned a value can never have a value fetched from it is designed for use by a lefthanded person Answer b an lvalue Typo should be Answer b assigned a value Explanation An lvalue may be assigned a value 6 An rvalue is a b c d V an expression that can be only placed on the right of any operator such as etc can never be assigned a value can have a value fetched from it is designed for use by a righthanded person Answer c an rvalue Explanation An rvalue can have a value fetched from it 7 In C a variable that has been de ned but not initialized may be used in any way any identifier can be used not be used at all not be used as an lvalue not be used as an rvalue have its value fetched prior to assignment Answer c is correct Explanation The value of an uninitialized variable may not be fetched but a value may be assigned to an uninitialized variable 8 The i f whi l e and f or statements control only one statement Answer True Page 5 Explanation The one statement may be a block statements that are enclosed with curly braces or a simple statement 1 Suppose we have these declarations intx l y0 Zl This Boolean expression is correct and it does what the programmer intends x lt y lt 2 Answer False Explanation Unfortunately the expression compiles without error and runs The lt operator associates groups left to right so the expression evaluates as x lt y lt z The left hand expression evaluates to true which if compared to a numeric type converts to 1 When compared to 1 this is f als e What the programmer intends expressed as mathematacs might is l lt 0lt l a result that is clearly true 2 ThevdueofcountisOlimitileEvMuMe coun Oampamplimit lt 20 Anmv true 3 ThevdueofcountisOlimitileEvMuMe count O ampamp limit lt 20 Anmv true Explanation The operators and lt have higher precedences than ampamp hence the expressions coun O and limit lt l0 are evaluated to true then the ampamp is executed 4 ThevdueofcountisOlimitileEvMuMe count Olllimit lt 20 Anmv true Explanation The first expression evaluates to false the value of the ll expression is determined by the second expression The second expression is true so the ll expression evaluates to true


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

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!"

Amaris Trozzo George Washington University

"I made $350 in just two days after posting my first study guide."

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."


"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.