Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

CSC102 Final Exam |Questions with 100% Correct Answers

Rating
-
Sold
-
Pages
21
Grade
A+
Uploaded on
19-10-2024
Written in
2024/2025

CSC102 Final Exam |Questions with 100% Correct Answers

Institution
CSC102
Course
CSC102

Content preview

CSC102 Final Exam |Questions with 100%
Correct Answers
What is the syntax of template and what does each parameter stand for? - ✔️✔️template <class
Type> declaration;
class- any user defined or built-in type
type- data type; formal parameter to the template



When does passing a parameter to a function take effect? - ✔️✔️at run time



When does passing a parameter to a class template take effect? - ✔️✔️at compile time



The implementation file cannot be compiled independently of the client code. - ✔️✔️True



The user can put class and function definition templates directly in the client code. - ✔️✔️True



The user can put class and function definition templates in the same header file. - ✔️✔️True



You can put class definitions and functions definitions in separate files. - ✔️✔️True



Function definitions and client codes are compiled together. - ✔️✔️True


An operator that has different meanings with different data types is said to be _____________.
- ✔️✔️Overloaded



Operator functions are ______-returning. - ✔️✔️Value

,Operator overloading provides the same concise notation for user-defined data types as for
built-in data types. - ✔️✔️True



Only existing operators can be overloaded. - ✔️✔️True


If an operator function is a member of a class, the leftmost operand must be a ________ object
of that operator's class. - ✔️✔️class



What is a parameterized type? - ✔️✔️a class template



What is an exception? - ✔️✔️An undesirable event in program execution



An exception-handling code can be added at a point where an error may occur. - ✔️✔️True



What does the assertion function do? - ✔️✔️Checks if an expressions meets certain conditions
and terminates if they are not met.



What is a try/catch block used for? - ✔️✔️To handle exceptions



Exception must be _____ in a try block and ______ by a catch block. - ✔️✔️thrown;caught



Statements that may generate an exception are placed in a _______ block. - ✔️✔️try



try block is followed by one or more catch blocks - ✔️✔️true


If the heading of a catch block contains (...) in place of parameters, that mean it can
catch_________. - ✔️✔️exceptions of all types

, If no exception is thrown in a try block, _________________. - ✔️✔️All catch blocks are ignored
and execution resumes after the last catch block.



If an exception is thrown in a try block, remaining statements are ____________. - ✔️✔️ignored


If the type of thrown exception matches the parameter type in one of the catch blocks, the
code of that block __________ and the remaining blocks are _________. - ✔️✔️executes;
ignored


A catch block can have at most _____ catch block parameter and becomes a placeholder for the
thrown value. - ✔️✔️one



For a try/catch block to work, the exception must be thrown in the ________. - ✔️✔️try block



Object being throw can only be a specific object. - ✔️✔️False; it can also be an anonymous
object.



An exception is a value. - ✔️✔️True



What can a catch block catch? - ✔️✔️All exceptions of a specific type and and all types of
exceptions



What does the WHAT function do? - ✔️✔️Returns a string containing the exception object
thrown by exception classes; tells you in words which exception object was thrown



What is a class exception? And what header file is it contained in? - ✔️✔️base class of the
exception classes;
exception

Written for

Institution
CSC102
Course
CSC102

Document information

Uploaded on
October 19, 2024
Number of pages
21
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$13.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
Examcheatcode
5.0
(1)

Get to know the seller

Seller avatar
Examcheatcode Phoenix University
View profile
Follow You need to be logged in order to follow users or courses
Sold
4
Member since
1 year
Number of followers
1
Documents
1236
Last sold
11 months ago
Perfect Solutions

Find all your exam solutions here Solved exam Questions Class Notes Assignments Textbooks and Tests Boost your Grades!!!!!!!!!!!!!!!

5.0

1 reviews

5
1
4
0
3
0
2
0
1
0

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions