1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Fed [463]
4 years ago
5

When an argument is passed to a method:A) its value is copied into the method's parameter variableB) its value may be changed wi

thin the called methodC) values may not be passed to methodsD) the method must not assign another value to the parameter that receives the argument
Computers and Technology
1 answer:
Dmitry_Shevchenko [17]4 years ago
8 0

Answer:

The correct answer for the given question is option(A) i.e its value is copied into the method's parameter variable.

Explanation:

Following are the points regarding that.

1.In function calling when we use call by value the actual argument is passed to the formal argument .

2.The actual argument are those which is present in the calling portion of the program.

3.The formal parameter are those which is present in method signature.

4.It means that The value of actual argument is copy into the formal argument i.e method's parameter.

5.Let us consider an example

    Following are the code in C++

#include<iostream>// header file

using namespace std;

void sum(int,int);

int main() // main function

{

int a=90,b=9; // variable declaration

sum(a,b);//here a and b are actual parameter calling function sum

return 0;

}

void sum(int p,int q) // function definition

{

cout<<" the sum  is :"<<p+q; // add

}

In this program the actual parameter is a and b and method parameter is p and q respectively.

The variable  a "actual parameter" is copies the value in  variable p "formal parameter".Similarly the variable  b  "actual parameter"  is copies the value in  variable p "formal parameter".So changes made in formal parameter does not reflected back to actual parameter this is call by value which copies the value of actual parameter to method parameter.

output:99

Therefore The correct option is(A).

You might be interested in
What does eco driving mean
Elena-2011 [213]

Answer:

Explanation:

Eco driving is the the practice of driving in such a way as to minimize fuel consumption and the emission of carbon dioxide.

8 0
3 years ago
While the names for Web addresses, or URLs, are not case-sensitive, the names for files you create for the Web are. 
gtnhenbr [62]
90% sure the answer isTrue
6 0
4 years ago
Write a program to input an integer num from the keyboard and: : find the area of a square whose side length is num. : find the
NeX [460]

Answer:

# include<iostream>  

# include<math.h>  

using namespace::std;  

void calc (int num)  

{

     cout<<"Area of Square" <<num*num;   

     cout<<"Volume of a sphere" << (4/3) *3.14*num*num*num;

     cout<<"Side of a Square" <<sqrt(num);  

     }  

int main ()  

{  

     int num;

     cout<<"Enter the Number"; cin>>num;  

      calc(num);  

      return 0;  

}  

Explanation:

I have used the swtich for the selection purpose. Also, I have used sqrt() function, and for that I have included math,h library.  And the various formula comes from mensuration. Rest part is self explanatory.

3 0
4 years ago
All of the following can cause a fatal execution-time error except: Group of answer choices Dereferencing a pointer that has not
7nadin3 [17]

Answer: Dereferencing a variable that is not a pointer

Explanation:

The execution time also refered to as the CPU time pertaining to a given task is the time that is used by the system to execute a task.

Some of the reasons for a fatal execution-time error include:

• Dereferencing a pointer that has not been initialized properly

• Dereferencing a null pointer

• Dereferencing a pointer that has not been assigned to point to a specific address.

It should be noted that dereferencing a variable that is not a pointer doesn't cause a fatal execution-time error.

6 0
3 years ago
When multiple frames arrive at the same location at the same time resulting in a garbled signal is called what?
Inessa05 [86]

Answer:

A

Explanation:

because there are multiple frames

4 0
3 years ago
Other questions:
  • Help me with 3dMODELING art please
    15·1 answer
  • Technological improvements have allowed people to inhabit a wider variety of places more easily. Please select the best answer f
    6·2 answers
  • What function does a security certificate perform
    15·2 answers
  • At the monthly product meeting, one of the Product Owners proposes an idea to address an immediate shortcoming of the product sy
    7·1 answer
  • A series circuit contains a generator, two devices, and connecting wires. The resistances of the two devices are 15 ohms and 10
    10·2 answers
  • In C++ :
    6·1 answer
  • What helps companies and organizations to target masses of people, provide 24/7 services, and deliver better marketing in a chea
    6·1 answer
  • create your own min function that finds the minimum element in a list and use it in a separate function
    14·1 answer
  • which scheduling algorithm allocate the CPU firt to the process that request the CPU first, (a) first come first serve,(b) short
    9·1 answer
  • 7.2 code practice edhesive. I need help!!
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!