blackshadowhawk9042 blackshadowhawk9042
  • 08-01-2021
  • Computers and Technology
contestada

What will be the output of the following code?
#include
void fun(int);
int main()
{
int a=3;
fun(a);
return 0;
}
void fun(int n)
{
if(n>0)
{
fun(--n);
printf("\n%d",n);
fun(--n);
}
}

Respuesta :

IfeanyiEze8899 IfeanyiEze8899
  • 10-01-2021

Answer:

The output is 0, 1, 2, 0

Explanation:

The C source code defines a void function called 'fun'. The fun function is a recursive function that is used to recursively count through a number excluding the last number, the function accepts an integer value to be counted.

Answer Link
jesusd7457 jesusd7457
  • 07-04-2021

Answer:

to be honest I don't know

Answer Link

Otras preguntas

Calculate the work done by a 47 n force pushing a pencil 0.26 m.do not include units but know that work is in joules.
What is manifest destiny? Why do Americans feel they have the right to practice it? :)
How do I show work for the circled question?
Around 1500 B.C.E., religious practices and beliefs began to solidify in India. This period is known as
"Illa nocte, dum Troiani dormiunt, milites inimici ex equo descendunt et Troia oppugnatur." TRANSLATE from LATIN to ENGLISH please dont use google translate, i
Graph the system of equations 2x-y=4 x-y=-2 I specifically need the slope and the y-intercept
what's the name given to the power of the supreme Court to rule as unconstitutional laws passed by Congress
do you hate math. A yes B noC Sometimes
Marine organisms that are euryhaline would most likely be found in which environment? deep ocean open ocean coastal estuary hydrothermal vent
Need help with 23 greater than equal to or less than