100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSC Exam Practice With Complete Solutions Latest Update $14.49   Add to cart

Exam (elaborations)

CSC Exam Practice With Complete Solutions Latest Update

 6 views  0 purchase
  • Course
  • CSC Vol1
  • Institution
  • CSC Vol1

CSC Exam Practice With Complete Solutions Latest Update

Preview 3 out of 23  pages

  • October 29, 2024
  • 23
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CSC Vol1
  • CSC Vol1
avatar-seller
Schoolflix
Solution 2024/2025
Pepper

CSC Exam Practice With Complete Solutions
Latest Update 2024-2025

The code

int funct(char, char);

is:



1. A function prototype

2. A function definition

3. A function call

4. None of the above ANS✔✔ A function prototype



What is the return type of the following prototype:

int func(char x, double t);



1. char

2. int

3. double

4. func

5. void

6. char and double ANS✔✔ int



Which of the following is a valid function call in C++ (assuming a function
called 'funct' exists):

, Solution 2024/2025
Pepper



1. funct;

2. funct x, y;

3. funct();

4. int funct(); ANS✔✔ funct();



Given the function prototype:

int funct(char x, double y, bool z);

which of the following would be the MOST correct call:



1. int funct(char x, double y, bool z);

2. funct(char x, double y, bool z);

3. funct('a', 2.5, true);

4. funct 'a', 2.5, true;

5. int answer = funct('a', 2.5, true); ANS✔✔ int answer = funct('a', 2.5,
true);



The function prototype

int foo (int y, int x = 4);

means:



1. The parameter y is passed by value.

2. The parameter x has a default value of 4.

3. The function foo returns an int value.

, Solution 2024/2025
Pepper
4. All of the above. ANS✔✔ All of the above.



When two functions with the same name are defined in the same scope, the
function is:



1. static

2. inline

3. overridden

4. overloaded ANS✔✔ overloaded



Overloaded functions must have:



1. different return types

2. different executable statements

3. different types and/or number of arguments

4. all of these ANS✔✔ different types and/or number of arguments



Given the following code, what would the output be:

#include <iostream>using namespace std;

void func_one();void func_two();void func_three();

int x = 1;

int main() {int x = 2;func_one();cout << x << " ";func_two();

return 0;}

void func_one() {int x = 3;cout << x << " ";func_three();}

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

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

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

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 Schoolflix. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $14.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

83637 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$14.49
  • (0)
  Add to cart