CPE 211 Final exam 2024 with 100% complete answers
2 views 0 purchase
Course
CPE 211 F b
Institution
CPE 211 F B
Which of the following is a way to put a comment into a C++ program? correct answers/* comment */
Which of the following are ways to structure statements in most programming languages(more than one answer is possible here. you need to select them all) correct answersSequentially
Loop
Subprogra...
Which of the following is a way to put a comment into a C++ program? correct answers/* comment */
Which of the following are ways to structure statements in most programming languages(more than one
answer is possible here. you need to select them all) correct answersSequentially
Loop
Subprogram
Selection
The implementation phase of computer programming involves which one of the following: correct
answersconverting the algorithm steps into a programming language
The job of a compiler is to do what? correct answerstranslate a high level programming language into
machine language
Which of the following is a problem solving technique mentioned in the slides for chapter 1? correct
answersDivide and Conquer
An expression is an arrangement of ____________, _________________ and ______________ that can
be evaluated to compute a value of a given type. correct answersOperations
Literals
Identifiers
From the notes and text, "The set of rules determining the meaning of the instructions written" is the
definition for _______________________ correct answersSemantics
In C++ using strict ANSII standard C++ (and as mentioned for this course), identifiers can start with what
character(s) (more than one answer is possible)? correct answersUnderscores
Letters
,In an assignment statement more than 1 variable can be present on the left hand side of the statement -
i.e. x + y =30; is a valid assignment statement correct answersFalse
Every C++ program must have a function named start correct answersTrue
The insertion operator << is used to insert information into the output file stream in C++? correct
answersTrue
In C++ capitalization of identifiers does not matter because identifiers NAME and name are considered to
be the same identifier by the compiler? correct answersFalse
In C++, which of the following operators are valid integer math operators? correct answers/
*
+
%
Which of the following are output file stream manipulators? correct answerssetprecission
left
showpoint
Given the C++ code segment below,
string str1, str2;
str1 = "The_third_Quiz_in_CPE211";
str2 = str1.substr(4,8);cout << str2;
What is the string value output by the output statement? correct answersthird_Qu
, Which of the following is a valid Named Constant Declaration in C++? correct answersconst string NAME
= "Elm";
in C++ the following statement will increment num by 1?
num++; correct answersTrue
The following C++ statement is an example of type casting the integer variable num to a floating point
value:
int num;
float var;
var = (num)float; correct answersFalse
in C++ the result of the integer division of 6/4 is 1.5? correct answersFalse
Typically, information is lost when a floating point value is coerced to an integer value. correct
answersTrue
In C++ the following assignment statement is valid?
in C++, void functions return a single function value? correct answersFalse
Which of the following statements will associate the file out.txt with the output file stream variable
outFile? (assume all variables and file streams have been declared correctly and that all header files are
present) correct answersoutFile.open("out.txt");
Which of the following functions is used to associate a file on the hard drive with a declared file stream
variable correct answersopen
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 QUILLSKY. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $18.49. You're not tied to anything after your purchase.