COSC 1436 Midterm UPDATED Questions and CORRECT Answers
3 views 0 purchase
Course
COSC 1436
Institution
COSC 1436
COSC 1436 Midterm UPDATED Questions
and CORRECT Answers
Every complete statement ends with a - CORRECT ANSWER- ;
Which of the following statements is correct?
A) #include (iostream)
B) #include <iostream>
C) #include {iostream}
D) #include [iostream]
E) All of the above - CORRECT ANS...
COSC 1436 Midterm UPDATED Questions
and CORRECT Answers
Every complete statement ends with a - CORRECT ANSWER- ✔✔;
Which of the following statements is correct?
A) #include (iostream)
B) #include <iostream>
C) #include {iostream}
D) #include [iostream]
E) All of the above - CORRECT ANSWER- ✔✔B
Every C++ program must have a A) cout statement - CORRECT ANSWER- ✔✔Function
Main
Preprocessor directives begin with a - CORRECT ANSWER- ✔✔#
The following data
72
'A'
"Hello World"
2.8712
are all examples of - CORRECT ANSWER- ✔✔Literals or constants
A group of statements, such as the contents of a function, is enclosed in - CORRECT
ANSWER- ✔✔Braces
The negation operator is - CORRECT ANSWER- ✔✔Unary
, A(n) ___________ is like a variable, but its value is read-only and cannot be changed during
the program's execution. - CORRECT ANSWER- ✔✔named constant
When do preprocessor directives execute? - CORRECT ANSWER- ✔✔
Assume value is an integer variable. If the user enters 3.14 in response to the following
programming statement, what will be stored in value?
cin >> value; - CORRECT ANSWER- ✔✔3
The _____ object can be used to read data typed at the keyboard. - CORRECT ANSWER-
✔✔cin object
When the user types values at the keyboard, those values are first stored in an area of memory
known as the _______ _______. - CORRECT ANSWER- ✔✔keyboard buffer
An ________ is a programming statement that has a value. Usually, consisting of an operator
and its operands. - CORRECT ANSWER- ✔✔Expression
When C++ is working with an operator, it strives to convert the operands to the same type,
this automatic conversion is known as _______ _________. - CORRECT ANSWER-
✔✔type coercion
When a variable is assigned a value that is too large or too small in range for that variable's
data type, the variable _________ or __________. - CORRECT ANSWER- ✔✔
______ ________ allows you to perform manual data type conversion. - CORRECT
ANSWER- ✔✔
Establishes a print field of n spaces. - CORRECT ANSWER- ✔✔setw(n)
Displays floating-point numbers in fixed point notation. - CORRECT ANSWER- ✔✔fixed
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 MGRADES. 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.