Question

Keep as simple as possible 1. How does a function differ from a module? 2. What...

Keep as simple as possible

1. How does a function differ from a module?

2. What is the purpose of the RETURN statement in a function?

3. Discuss the relationship between parameterList and argumentList

4. IF the first parameter has the Integer data type and the 2nd parameter has the Double data type, what data types should the first and second arguments have?

0 0
Add a comment Improve this question Transcribed image text
Answer #1
  1. In simplest manner we can define a function as a statement or group of statements bounded with a specific name which having a specific task and will result some value is known as a function. A function is a type module which will return some value after it is being called.

But a module can be defined as a group of functions stored in a file. In simplest form we can define a module as a group os statements that exist within a program which is used for a specific task.

  1. The purpose of a return statement in a function is to terminate the execution of a function and send the control to the calling part. In other words for some function we can say that the return statement will return the final value of the function which intern called as the result.
  2. In a function the parameterList and argumentList are closely associated with each other. The aregumentList are the values that are provided in a function call whereas the parameterList are the name of variables that is used in function declaration or definition to stores the argumentList.
  3. IF the first parameter has the Integer data type and the 2nd parameter has the Double data type, then the first argument must be Integer type and second must be Double type.
Add a comment
Know the answer?
Add Answer to:
Keep as simple as possible 1. How does a function differ from a module? 2. What...
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
  • 1. Write a statement that calls a function named showSquare, passing the value 10 as an...

    1. Write a statement that calls a function named showSquare, passing the value 10 as an argument. 2. Write the function prototype for a function called showSquare. The function should have a single parameter variable of the int data type and areturn type of void. 3. Write the function prototype for a function called showScoreswith a parameter list containing four integer variables and a return type of void. 4. Look at the following function definition: double getGrossPay(int hoursWorked, double payRate)...

  • Question 1 Answer the questions below about this function prototype: double coinTotal (double coinValue, int nCoins);...

    Question 1 Answer the questions below about this function prototype: double coinTotal (double coinValue, int nCoins); What is the type of the return value?   How many parameters does the function take? What is the name of the function? Question 2 These are defined in the function heading and tell a user what data needs to be sent to a function. Question 3 What is the term used for a variable sent as data in a function call, such as n1...

  • 1. What is SNP? How does it differ from Mutation? Is there a possible medical and...

    1. What is SNP? How does it differ from Mutation? Is there a possible medical and scientific application for SNP? 2. What is epigenetics? What is the significance of epigenetic changes? 3. What is hybridization? List the importance of this process in studying the natural world?

  • 1. Construct a table of the possible linear systems as follows: (a) The first column contains the...

    1 and 2 1. Construct a table of the possible linear systems as follows: (a) The first column contains the type of the system (sink, spiral sink, source, if it has a name. (b) The second column contains the condition on the eigenvalues that corresponds (c) The third column contains a small picture of two or more possible phase por- (d) The fourth column contains x(1)-and y(a)-graphs of typical solutions indicated Hint: The most complete table contains 14 cases. Don't...

  • 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...

  • 1.Suppose that the goop function from the previous question changes the value of z[1]. Does this...

    1.Suppose that the goop function from the previous question changes the value of z[1]. Does this change effect the value of the actual argument? A. Yes B. No 2.Here is a function declaration: void goo(int* x) { *x = 1; } Suppose that a is an int* variable pointing to some integer, and *a is equal to zero. What is printed if you print *a after the function call goo(a)? A. 0 B. 1 C. address of a D. address...

  • Garcia Ch. 1 1. What is bilingual education? How does it differ from language education? 2....

    Garcia Ch. 1 1. What is bilingual education? How does it differ from language education? 2. Explain the difference between the bicycle and the all-terrain vehicle in thinking about bilingualism. Garcia Ch. 1 1. What is bilingual education? How does it differ from language education? 2. Explain the difference between the bicycle and the all-terrain vehicle in thinking about bilingualism.

  • Question 31 In C, what is the computational result of 8/5*2.5? Question 32 Examine the for...

    Question 31 In C, what is the computational result of 8/5*2.5? Question 32 Examine the for statement given below. What is the most correct answer given below? for(degrees==0.0; degrees<=360.0; degrees+=20.0) ( ) Degrees must be in radians. ( ) Degrees must be capitalized. ( ) Cannot use double equal signs for assigning values to variables. ( ) Degrees cannot be incremented in the manner shown. Question 33 In a C program the formal and actual parameters that are used between...

  • 1. What is Activity-based budgeting? How does it differ from traditional budgeting systems? 2. List and...

    1. What is Activity-based budgeting? How does it differ from traditional budgeting systems? 2. List and explain 3 benefits of budgeting 3. List and explain 2 of the negative outcomes of budgeting. 4. What information does the sales budget provide for a company? 5. What information does the production budget provide for a company? 6. What information does the direct materials budget provide for a company? 7. What information does the direct labor budget provide for a company? 8. What...

  • please answer 1. What is "money"? 2. How does MMT differ from the way money is...

    please answer 1. What is "money"? 2. How does MMT differ from the way money is modeled by other schools of thought? 3. Specifically, how do Walras and Arrow & Debreu model money? 4. Does money have anything to do with institutions, or does money exist independently from an economy's institutions? Part B. Contrast the Schumpeter/Romer model and the Marxian model. Both deal with innovation and the intentional introduction of technological changes, but the motivations are somewhat different. Explain the...

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