CMSC 216 EXAM 1 QUESTIONS WITH
COMPLETE SOLUTIONS
format specifier for char correct answer: %c
format specifier for int correct answer: %d
format specifier for real correct answer: %f
What is object code? correct answer: its machine code, but it is not executable!
When is feof(stdin) true! correct answer: when you've read to the end of the file
What happens if you dont enter enough values as specified by the format control string for scanf? correct answer: scanf will wait unitl as many values as format specifiers have been entered
What happens if you enter too many values as specified by the format control string for scanf? correct answer: the excess will remain unread, the next scanf will read them
what is scanf's form? correct answer: scanf ( format-control-
string, &variables )
What does scanf do? correct answer: reads in input
what are the two forms of printf? correct answer: printf( "character-string" ); printf ("format-control-string" , list-of-expressions)
What are escape sequences? correct answer: They have special effects when printed
what is '\n' correct answer: escape sequence that prints a new line
what is '\t' correct answer: escape sequence that prints a tab
what are format specifiers? correct answer: They are replaced by values of the designated type
What happens to stuff inside quotation marks in printf? correct answer: theyre printed exactly as is, except for format specifiers
and escape sequences
are parameter names necessary in function prototypes? correct answer: no, but you should use them
Command: touch correct answer: creates a new file
Command: -f correct answer: flag that means force
What is prepoccessing? correct answer: The first step to compilation in C, makes certain modifications to the program based on preproccessor directives, and runs the modified code
when do you use "" with #include? correct answer: with files you wrote
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Classroom. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for £8.56. You're not tied to anything after your purchase.