Question

Answer the following multiple choice questions: 1) What is scope? a. The region between curly braces....

Answer the following multiple choice questions:

1) What is scope?

a. The region between curly braces.

b. The region of code where a name can be used to reference a piece of data.

c. The name for a piece of memory that holds a value.

d. The abstraction of a concept that is important to remember.

2) Which of the following is not an Object Oriented concept?

a. Procedure Calling.

b. Inheritance.

c. Access Specifiers.

d. None of the above.

3) Which of the following C or C++ lines would put memory on the Stack? (Circle all that apply)

a. int data = 3;

b. int data[10];

c. int *data = (int*) malloc (40);

d. int *data = new int[10];

4) What does it mean when we say that C is a “pass by value” language? (Circle all that apply)

a. Memory is reserved for the formal parameters and references to the values of the actual arguments are placed into that memory.

b. Memory is not reserved for the formal parameters, and the value of the actual arguments is used directly by the called function.

c. Memory is reserved for the formal parameters, and references to arguments are placed into memory.

d. Memory is reserved for the formal parameters, and the value of the actual arguments is copied into that memory.

5) What is the purpose of a struct in C? (Circle all that apply)

a. Allowing for operator overloading.

b. Simplifying complex code.

c. The creation OOP.

d. Reducing the number of lines necessary to allocate memory for data.

6) Which significant advantage does OOP grant humans?

a. Compilers that help determine when typing errors may have occurred before execution.

b. Less code to implement.

c. Conceptual breakdowns along lines of abstractions that make sense to humans.

d. All of the above.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. b. The region of code where a name can be used to reference a piece of data.

2. d. None of the above.

3. b. int data[10];

4. b. Memory is not reserved for the formal parameters, and the value of the actual arguments is used directly by the called function.

5.

a. Allowing for operator overloading.

b. Simplifying complex code.

c. The creation OOP.

6.  

b. Less code to implement.

c. Conceptual breakdowns along lines of abstractions that make sense to humans.

Add a comment
Know the answer?
Add Answer to:
Answer the following multiple choice questions: 1) What is scope? a. The region between curly braces....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Multiple Choice Multiple Choice Section 4.1 Pointers and Dynamic Memory Consider the following statements: int *p;...

    Multiple Choice Multiple Choice Section 4.1 Pointers and Dynamic Memory Consider the following statements: int *p; int i; int k; i = 42; k = i; p = &i; After these statements, which of the following statements will change the value of i to 75? A. k = 75; B. *k = 75; C. p = 75; D. *p = 75; E. Two or more of the answers will change i to 75. Consider the following statements: int i =...

  • C++, you can skip #1 Part 2. Practice Problems The following questions ask you to write...

    C++, you can skip #1 Part 2. Practice Problems The following questions ask you to write a program to compute the area of a circle using the equation A = 1 m2. The radius of the circle should be entered by the program user. 1. Draw a structure chart 2. Make a new directory called CircleFun and make it the CWD. Work inside this directory to keep your files (Main.cpp, Circle.cpp, Circle.h) grouped together 3. Using the three-file format a....

  • COSC 112 Test #3 Spring 2019 20. It is not necessary to specify the parameter name...

    COSC 112 Test #3 Spring 2019 20. It is not necessary to specify the parameter name in the parameter list of a function prototype even 21. Which of following is not a situation when reference parameters are useful? though there is a default parameter. (True/False) a. When you don't want to have side effects b. When you need to change the actual parameter c. When you need to return more than one value d. When you want to save memory...

  • Please answer the questions correctly ASAP. It's multiple choice. 1) 2) 3) Which of the following...

    Please answer the questions correctly ASAP. It's multiple choice. 1) 2) 3) Which of the following values of the Condition Code (N Z P) could occur in the LC-3 to indicate that the value written to the register file is less than or equal to zero? [You must check all that apply to get credit.] 000 001 011 100 101 110 111 Which of the following instructions overwrite the Condition Code? [You must check all that apply to get credit.]...

  • Answer the following multiple choice/True False Questions A) Why are CCD images only approximations to the original scene being imaged by your optics? Circle all that apply a) Each pixel records...

    Answer the following multiple choice/True False Questions A) Why are CCD images only approximations to the original scene being imaged by your optics? Circle all that apply a) Each pixel records only the total number of photons, not where in the pixel they arrived. accurately report the actual counts in each pixel. scene which were not sampled by the CCD close the shutter and the time the A/D converter counts the electrons in the b) No A/D converter (regardless of...

  • can someone help me answer the following #Fsharp multiple choice questions along with explanations for each...

    can someone help me answer the following #Fsharp multiple choice questions along with explanations for each question please. 7. How does F# interpret the type int * bool -> string list? Select one: a. (int * (bool -> string)) list b. ((int * bool) -> string) list c. int * (bool -> (string list)) d. (int * bool) -> (string list) 8. Let F# function foo be defined as follows: let rec foo = function | (xs, []) -> xs...

  • 1,4,5 Multiple Choice (Find Output or Fix Error) 1. What will be the final value of...

    1,4,5 Multiple Choice (Find Output or Fix Error) 1. What will be the final value of product 7、 inta,b; Given above code, what will be the value of a andb if user types: 31 42 nt producr- 3, product 3 prodct while (product70) a) 81 31 What is the output of the following code? char Grade8 27 8. d) Error in do-while code 2. This loop is a good choice when you know how many times you want the loop...

  • Select the correct definition at right for each of the terms at left (matching):                             &nbsp

    Select the correct definition at right for each of the terms at left (matching):                                                             A.   Changes to these parameters inside a function will not cause 1.   Local Variables ________                      the corresponding argument values to change.                                                             B.   Their values are not allowed to be changed.                                                             C.   Declared in the body of a function. They are accessible 2.   Array ______                                         only within a limited scope.                                                             D.   Denoted with an ampersand (&). Indicates that arguments                                                                   passed into a...

  • LC-3 Programming Help!! The Stack Protocol The following outline is the protocol for passing arguments to...

    LC-3 Programming Help!! The Stack Protocol The following outline is the protocol for passing arguments to a function and returning values. Everything is stored on the runtime stack so that space is used only when the function is executing. As a result the actual address of arguments and locals may change from call to call. However, the layout of the stack frame (activation record) is constant. Thus, the offests from the frame pointer (FP) to the parameters/locals are constant. All...

  • Multiple Choice Multiple Choice Section 2.1 - 2.2 Introduction to Classes Here is the start of...

    Multiple Choice Multiple Choice Section 2.1 - 2.2 Introduction to Classes Here is the start of a class declaration: class foo { public: void x(foo f); void y(const foo f); void z(foo f) const; ... Which of the three member functions can alter the PRIVATE member variables of the foo object that activates the function? A. Only x can alter the private member variables of the object that activates the function. B. Only y can alter the private member variables...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT