COP 3223 Exam 1 Questions and
Answers
Given the source code below, how many tokens make up the statement?
printf("Hello COP 3223!"); - Answer-5
In a C program, an individual statement must be ended with a semicolon. - Answer-true
There are multiple formats of an acceptable comment in C, select all that apply. -
Answer-//comment or /*
Comment */
Regarding identifiers for variables, functions, or any other user-defined item, which of
the following are acceptable? Select all that apply. - Answer--_variable
- VARIABLE
- var23iable
- variable
Regarding keywords in the C programming language and creating identifiers. Keywords
are reserved in all lowercase AND all uppercase. - Answer-false
Regarding whitespace in the C programming language, spaces are required between
the operators in the following source code in order to compile, run, and provide the
correct output.
int sum=2+3/2-12*15; - Answer-false
Constants cannot be altered during program execution. - Answer-true
Professional best practices state that when using constants in source code the syntax
should be in which format? - Answer-uppercase
Literals are equivalent to fixed values in regard to computer programming in the C
language. - Answer-true
Which data types are valid regarding integer literals for constants? Select all that apply.
- Answer-- hexadecimal
- decimal
- octal
Which of the following are the parts of a floating point constant? Select all that apply. -
Answer--decimal point
-fractional part
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 or Stuvia-credit 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 lectknancy. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $10.49. You're not tied to anything after your purchase.