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]
3 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:
hjlf3 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
. Write a recursive function names factorial to compute the factorial of the parameter. Also write the main function, where you
r-ruslan [8.4K]

Answer:

Following are the code in c language

#include <stdio.h> // header file

long int factorial(int n); // declaration of factorial function

int main() // main function

{

   int n; // variable declaration

   printf("Enter a positive integer: ");

   scanf("%d", &n); // input number

   while(n<0) // checking the condition if number is negative

{

    printf("please enter a positive number:");

    scanf("%d", &n);

}

   printf("Factorial of %d = %ld", n, factorial(n)); // calling  factorial function

   return 0;

}

long int factorial(int n1) // recursive definition of factorial

{

   if (n1 >= 1)

       return n1*factorial(n1-1);

   else

       return 1;

}

Explanation:

In this program, it ask for a positive number input. if the value enter by user is negative then it again ask for positive input i.e positive number. Then it calls the recursive function of factorial. the recursive function factorial calculate the factorial recursively. suppose user input 4 then it goes to the if  part of program i.e return n*factorial(n-1); that means return 4*factorial(3) again recursive function call itself .this process repeated until it meets the base condition.  when a base condition meets, it return factorial of the given number.

output

Enter a positive integer: 5

factorial of 5=120

Enter a positive integer: -8

please enter a positive number:4

factorial of 4=24

4 0
3 years ago
Why would a team choose to employ a zone defense over a person to person defense?
vova2212 [387]

Answer/Explanation:

Zone defense is chosen if MULTIPLE people are attacking one spot that's why they would choose zone defense.

Person to person defense is when 1 person is attacking one spot so somebodies sent out to defend it.

<u><em>~ LadyBrain</em></u>

7 0
3 years ago
A filter is limited to extracting data from a single table. <br> a. True <br> b. False
oksano4ka [1.4K]

<span>It is true that a filter is limited to extracting data from a single table.

</span><span>Extraction is the operation of copying data from a database into a file or onto a network connection. This is the first step of the ETT process: data must be extracted from the source system(s) so that this data may be subsequently transformed and loaded into the data warehouse.</span>

3 0
3 years ago
Select L for the items that refer to General Lee, H for General Halleck, and M for General McClellan.
Naily [24]

The letters that represent the names of the individuals associated with the various actions are; M, L, H, M, L

<h3>What were the Activities of Railroad Presidents?</h3>

1) The person that removed from command twice for being overly cautious was General McClellan.

2) The person that felt a victory in the North would turn public opinion against the war was General Lee.

3) The person that retreated to Washington, leaving the Confederates free to attack the North was General Halleck

4) The person that stopped the Confederate Army at Antietam was General McClellan.

5) The person that was offered command of Union Army after Fort Sumter was General Lee.

Read more about history of railroad Presidents at; brainly.com/question/25997960

7 0
3 years ago
I need help Asap!!! So the question is "Compare and contrast Web page and Websites". ​
777dan777 [17]

Answer:

A website is a mix of web pages while a web page is a single entity.

Explanation:

4 0
3 years ago
Other questions:
  • Quote one of morrie's aphorisms and explain what you think it means (page 18).
    14·1 answer
  • Why is it important to know much time you spend on task
    8·1 answer
  • Henry is troubleshooting a network connection and wants to see if he can connect to the server on his network. Which Microsoft c
    14·1 answer
  • Consider the following scenario below and recommend a solution.
    8·1 answer
  • What is indexing ? How does it make search engines work more efficiently?
    15·1 answer
  • Can someone answer this ?
    7·1 answer
  • What is the output?
    6·2 answers
  • How does one award the brainliest???? will give brainliest.
    8·2 answers
  • What is the function of the operating system of a computer?
    14·1 answer
  • refer to the exhibit. a user pc has successfully transmitted packets to www.cisco. which ip address does the user pc target in o
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!