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
photoshop1234 [79]
2 years ago
14

Function prototypes and function definitions look similar because they have the same function heading. In a function prototype t

he heading is followed by a ___, whereas in a function definition the heading is followed by a ___.
Computers and Technology
1 answer:
hjlf2 years ago
3 0

Answer:

In a function prototype the heading is followed by a semicolon, whereas in a function definition the heading is followed by a function block.

Explanation:

As the function prototype only declares the function and the function definition defines the operations in the function.

e.g:

add(int x, int y);  is the prototype

add(int x, int y)

{

     int sum;

     sum = x+y;

}    is the function definition.

You might be interested in
Given that two int variables, total and amount, have been declared, write a loop that reads integers into amount and adds all th
Whitepunk [10]

Answer:

Following are the statement in C++ Language is given below

total=0; // variable declaration

cin >> amount; // Read the input

while(amount >=0) //iterating the loop

{

if(amount>0) // checking condition

total=total+amount; // perform operation

}

Explanation:

Following is the description of the statement

  • Declared a variable "total" and initialized with them 0 to them.
  • Read the input in the "amount" variable by using cin.
  • iterating the loop when the amount is greater then 0.
  • Checking the condition if(amount>0) then adding the total variable and amount and storing them into the total variable.

8 0
3 years ago
What allows people to create their own radio shows over the internet?
Alex787 [66]
Broadcasting sites, greater internet freedom,. 
6 0
3 years ago
The 'client area' of a window is the area used to display the contents of the window (thus a title bar or border would lie outsi
Lady_Fox [76]

Answer:

<u>Window.java</u>

  1. public class Window {
  2.    int width;
  3.    int height;
  4.    public Window(int width, int height){
  5.        this.width = width;
  6.        this.height = height;
  7.    }
  8.    public int getWidth(){
  9.        return width;
  10.    }
  11.    public int getHeight(){
  12.        return height;
  13.    }
  14.    public int getClientAreaHeight(){
  15.        return getHeight();
  16.    }
  17. }

<u>Main.java</u>

  1. public class Main {
  2.    public static void main (String [] args) {
  3.        Window win1 = new Window(12, 15);
  4.        System.out.println(win1.getClientAreaHeight());
  5.    }
  6. }

Explanation:

<u>Window.java</u>

There is a Window class with two int type attributes, width and height (Line 1 - 3).

The constructor of this class will take two inputs, width and height and set these input to its attributes (Line 5 - 8). There are two methods getWidth and getHeight which will return the value of attributes width and height, respectively (Line 10 - 16).

The required new method getClientAreaHeight is defined in line 18 -20. This method will call the getHeight method to return the height value of the window (Line 19).

<u>Main.java</u>

We test the Window class by creating one Window instance and call the getClientAreaHeight method and print the return output (Line 1 -6).

We shall see 15 is printed.

4 0
3 years ago
Sarah has to add a picture from her computer file and add a caption to it. Arrange the steps in a correct sequence.
SVEN [57.7K]
Click Insert
click Picture
click From File
select the desired picture and again click insert
right-click the picture
click Insert Caption
write the caption and add it
5 0
3 years ago
Read 2 more answers
QUESTION 5
lesya692 [45]
I’m pretty sure D but it should be like $B2
8 0
2 years ago
Other questions:
  • Briefly describe "SoftwareEngineering Framework". Do provide examples and diagrams wherenecessary.
    15·1 answer
  • Impact of computer on education
    6·2 answers
  • Who is typically considered to be the father of computing
    6·1 answer
  • What control features will you use in the input screens to aid in data entry? give a specific example of how you will use at lea
    6·1 answer
  • Which one of these tasks best describes the process of localization?
    12·1 answer
  • Define and test a function myRange. This function should behave like Python’s standard range function, with the required and opt
    13·2 answers
  • Problem 1: Create a list that contains the months of the year. Problem 2: Create a loop to print the month number and name (do n
    7·1 answer
  • In this section of your final project, you will write a basic script to create and back up files. You will create this script wi
    11·2 answers
  • Identify some advantages of using Excel over lists, paper files, or simple word documents? Describe some disadvantages of using
    15·1 answer
  • Write an assembly subroutine that check if a number is in the interval of [0, 10] and return 1 if the number is in this interval
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!