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);
}
}

Answers

Answer 1

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 2

Answer:

to be honest I don't know


Related Questions

Explain why the MS08-067 exploit is bad.

Answers

Answer:

MS08-067 was a security update. It is considered bad.

Explanation:

The MS08-067 was a security bulletin by Microsoft. It was a security update of out-of-band which was released by Microsoft Inc. on October 23rd in the year 2008.

The MS08-067 is considered bad as the vulnerability which stated that the Server service in the Microsoft Windows version of SP4 and XP SP2 and SP3, along with the Server 2003 SP1 and sP2, also Vista Gold as well as SP1, Server. This shows that system is vulnerable to MS08-067 exploit on the Port 445, which makes the TargetVulnerable01 to be a very high-risk system.

Write a program that inputs a text file. The program should print the unique words in the file in alphabetical order. Uppercase words should take precedence over lowercase words. For example, 'Z' comes before 'a'.

Answers

Answer:

unique = []

with open("file_name.txt", "r") as file:

   lines = file.readlines()

   for line in lines:

       # assuming comma is the only delimiter in the file

       words = line.split()

       for word in words:

           word = word.strip()

           if word not in unique:

               unique.append(word)

unique = sorted(unique)

print(unique)

Explanation:

The python module opens a file using the 'with' keyword (the file closes automatically at the end end of the indentation) and the open built-in function and reads the content of the open file as a list of lines of the content.

Each line is split into a list and the unique words are collected and stored in the unique list variable.

The program is an illustration of file manipulations.

File manipulation involves writing to and reading from a file

The program in Python where comments are used to explain each line is as follows:

#This creates an empty list

wordList = []

#This opens the file

with open("myFile.txt", "r") as file:

   #This reads the file, line by line

   lines = file.readlines()

   #This iterates through each line

   for line in lines:

       #This splits each line into words

       words = line.split()

       #This iterates through each word

       for word in words:

           #This removes the spaces in each word

           word = word.strip()

           #This adds unique words to the list

           if word not in wordList:

               wordList.append(word)

#This prints the unique words in alphabetical order

print(sorted(wordList))

Read more about similar programs at:

https://brainly.com/question/19652376

Melissa wrote the following method in Java. It is designed to compute 2^n, but returns an incorrect result. In which line has she made a mistake?
public static int powerTwo(int n)
if (n == 1){
return 1;
} else {
return 2 + powerTwo(n-1);

Answers

Answer:

public static int powerTwo(int n) {

  if (n == 0){

     return 1;

  } else {

     return 2 * powerTwo(n-1);

  }

}

Explanation:

There are actually three mistakes:

2⁰ = 1, so the end criterium of the recursion should be n==0the + should be a *various curly braces missing

1. Trust can be built in a relationship if:
A. There is transparency, both parties feel listened to and understood, communication is
approached with a "win-win" mentality, and all parties assume their due responsibility for
problems and issues
B. There is transparency, and it is established as soon as possible which party is right
C. O All parties feel heard and understood, and the dominant party gets their way
D. O Communication is approached with a "win-win" mentality, as long as all parties get their
point across

Answers

Answer:

A

Explanation:

because if both parties feel safe communicating and feel understood by the other party they feel safe trusting the other person and it develops a trust worthy relationship

Trust can be built in a relationship if there is transparency, both parties feel listened to and understood, communication is approached with a "win-win" mentality, and all parties assume their due responsibility for problems and issues. Thus, option (a) is correct.

What is relationship?

The term relationship was to maintain of the person. The relationship was the measure of the one parties to the another parties. The relationship was the included of the two members. The friends and the family are the included of the relationship. The relationship was the necessary.

The two participants in the relationship-building process were transparent with one another. They experience being heard and understood. They are explained to the people who are approached with a "win-win" perspective. All of the parties involved's concerns and difficulties fall under their proper jurisdiction.

Therefore, option (a) is correct.

Learn more about on relationship, here:

https://brainly.com/question/23752761

#SPJ2

Can you withdraw from courses in top hat?

Answers

Answer:

Yes, but this must be done before the withdraw deadline

Explanation:

TopHat is an online learning platform. Students register for courses and if they decide not to continue with a course for reasons best known to them, they are allowed a time period usually one to two weeks to drop the courses. They are then reimbursed the fee for that particular course.

But if that time period elapses and they drop the course, that is considered a withdrawal that is not accepted and which no provisions for reimbursements are made.

In 2002, Congress passed the Federal Information Security Management Act (FISMA), which mandates that all federal agencies __________.

Answers

Answer: implement plans regarding information security so that sensitive data can be protected.

Explanation:

FISMA is an acronym that simply means Federal Information Security Management Act. This Act was passed by the Congress of the United States in 2002. According to the Act, there should be implementation of plans regarding information security by every federal agencies so that sensitive data's can be protected.

This was necessary so that there can be integrity, and confidentiality with regards to the informations that are system related.

if you were an architect planning on building a large scale Municipal complex what type of engineer would you identify as essential to the Project's success
mechanical engineer
structural engineer
civil engineer
computer engineer​

Answers

Answer: civil engineer

Explanation:

Based on the information given, the type of engineer that would be identified as essential to the success of the project would be the civil engineer.

Civil engineers are the engineers that are in charge of the planning and overseeing building and infrastructure construction. They plan and monitor constructions involving bridges, road, houses, power plants etc.

Answer:

The answer is civil engineer.

Explanation:

There are many advantages and some disadvantages to using social media. Explain at least one of the advantages to
social media use and at least one of the disadvantages. Do you think that the widespread use of social media is a good
thing over all? Why or why not?

Answers

Answer:  yes

Explanation:social media has the advantage of long distance communication and a disadvantage is cyber bullying and yes i thank if most people where nice long social media is good  

Custom actions help your users by

Answers

Answer:

D) Making it fast and easy to interact with information in your organization.

Explanation:

PLEASE MARK ME AS BRAINLIEST

16 Select the correct answer. Rachel has set up a computer network. In this network, due to a device, the computers partake in the message transfer process. Which device is this? ОА. NIC B. hub C. modem D. switch E. bridge Reset Reset Next​

Answers

Answer:D. switch

Explanation:cause it is

A spreadsheet is an example of a(n):

Answers

Answer:

general-purpose application

Explanation:

General purpose application

1. These are software applications which can be used for multiple purposes.

2. These applications perform various tasks as per the need of the user. These tasks can vary in complexity and may or may not be related to each other.

3. These applications are useful for almost all categories of users.

Example include spreadsheets which is a primary application for accounting purpose. It can also be used for to store numerical data or other data in an organized format.

Another use of spreadsheets is visible in data analysis. Graphs and charts can be created based on the given numerical data stored in the spreadsheet. This helps in business growth.

Microsoft Excel and Apple Numbers are spreadsheet applications.

Another example is a word application that can be used to prepare document, reports, and flyers also. Microsoft word is a word processor.

Specialized program

1. These are software applications which can be used for special purpose only.

2. These applications can perform only the task for which it is created.

Examples include windows media player. This application can only run media (audio or video) programs.

System application

1. These include operating system and utility applications.

2. The operating system acts as an interface between the user and the hardware resources of the computer.

For example, Windows is an operating system. It is available in various versions.

3. The computer system and its resources, both software and hardware, are maintained and optimized using utility applications.

Anti-virus is an example of utility applications. It protects the computer resources from virus.

Utility applications

4. The computer system and its resources, both software and hardware, are maintained and optimized using utility applications.

5. These applications are mandatory to smooth functioning of a computer.

For example, disk driver, file manager and back up applications help in managing disks and aid in taking back ups and file management is done by file manager

What does 'online social networking' mean?

Answers

Answer:

The 3rd one is correct :)

which option enable you to change the background colour of a slide​

Answers

Explanation:

In order to change the background color in Microsoft PowerPoint 2010 we need to go to View and Slide Master. Then, right click on the first slide and click Format Background. Then you can access the background options, including a way to change the background gradient effect or use a solid background color.

2. The Internet could best be described as: *
10 points
WWW
A large spider web
A series of roads and highways
A never ending tunnel

Answers

Answer:

Explanation:

All options are correct.

what happens if none of the selector values match selector in a simple case expression in pl/sql

Answers

Answer:

If no values in WHERE clauses match the result of the selector in the CASE clause, the sequence of statements in the ELSE clause executes. ... When the IF THEN statement has no ELSE clause and the condition is not met, PL/SQL does nothing instead raising an error.

Explanation:

Write a program called FarewellGoodBye that prints the following lyrics. Use static methods to show structure and eliminate redundancy in your solution. Farewell, goodbye, au revoir, good night! It's time, to go, and I'll be out of sight! Farewell, goodbye, au revoir, take care! I'll say, goodbye, that's neither here nor there! Farewell, goodbye, au revoir, see you later! I hope, you think, I'm a lover, not a hater!

Answers

Answer:

Please find the attachment file of the code.

Explanation:

In this code, a static method "lyrics" is declared, that defines three-string variable "a,b, and c ", that holds some values, which is defined in the question and use print method to print other values and prints "a,b, and c" string value inside the main method the static method "lyrics" is called that print the above values.  

(PYTHON) Complete the program to print out nicely formatted football player statistics. Match the following output as closely as possible -- the ordering of players is not important for this example.
2012 quarterback statistics:
Passes completed:
Greg McElroy : 19
Aaron Rodgers : 371
Peyton Manning : 400
Matt Leinart : 16
Passing yards: ...
Touchdowns / Interception ratio:
Greg McElroy : 1.00
Aaron Rodgers : 4.88
Peyton Manning : 3.36
Matt Leinart : 0.00
quarterback_stats = {
'Aaron Rodgers': {'COMP': 371, 'YDS': 4925, 'TD': 39, 'INT': 8},
'Peyton Manning': {'COMP': 400, 'YDS': 4659, 'TD': 37, 'INT': 11},
'Greg McElroy': {'COMP': 19, 'YDS': 214, 'TD': 1, 'INT': 1},
'Matt Leinart': {'COMP': 16, 'YDS': 115, 'TD': 0, 'INT': 1}
}

print('2012 quarterback statistics:')

print(' Passes completed:')
for qb in quarterback_stats:
comp = quarterback_stats[qb]['COMP']
#print(' %?: %?' % (qb, comp)) # Replace conversion specifiers
# Hint: Use the conversion flag '-' to left-justify names

print(' Passing yards:')
for qb in quarterback_stats:
print(' QB: yards')

print(' Touchdown / interception ratio:')
# ...
# Hint: Convert TD/INTs to float before calculating ratio

Answers

Answer:

quarterback_stats = {

'Aaron Rodgers': {'COMP': 371, 'YDS': 4925, 'TD': 39, 'INT': 8},

'Peyton Manning': {'COMP': 400, 'YDS': 4659, 'TD': 37, 'INT': 11},

'Greg McElroy': {'COMP': 19, 'YDS': 214, 'TD': 1, 'INT': 1},

'Matt Leinart': {'COMP': 16, 'YDS': 115, 'TD': 0, 'INT': 1}

}

print("2012 quaterback statistics: ")

print("Passes completed: ")

for qb in quaterback_stats.keys():

   print(f"{quaterback_stats[qb]} : {quaterback_stats[qb]['COMP']}")

print("Passing yards:")

for qb in quaterback_stats.keys():

   print(f"{quaterback_stats[qb]} : {quaterback_stats[qb]['YDS']}")

print("Touchdown / interception ratio")

for qb in quaterback_stats.keys():

   if quaterback_stats[qb]['TD'] > 0 and quaterback_stats[qb]['INT'] > 0:

       print(f"{quaterback_stats[qb]} : {float(quaterback_stats[qb]['TD']) / float(quaterback_stats[qb]['INT])}")

   else:

       print(f"{quaterback_stats[qb]} : {0.0}")

Explanation:

The python program gets data from a dictionary called quaterback_stats which holds the data of football players with their names as the keys and a list of records as the value.

The program prints the individual records from the dictionary using a for loop statement on the list of dictionary keys (using the keys() method).

Print air_temperature with 1 decimal point followed by C. Sample output from given program: 36.4C Python?

Answers

Answer:

print( f"{round(air_temperature, 1)}C")

Explanation:

The print function is a function in python used to output the result of the program. The 'f' is a python3 syntax used to format strings, while the round function is used to return a float number with a specified number of decimal points.

The code above outputs a string of the float number variable air_temperature in celsius.

Answer: print(f'{air_temperature:.1f}C')

Explanation:

The letter 'f'  indicates that this string is used for formatting. 1f basically means that we are looking for one decimal point. That is how we get the .4 instead of more decimals.

If we had 3f for example, we would see 36.400

We then include C after the brace so that is ends with C.

Create a program to determine the largest and smallest number out of 15 numbers entered (numbers entered one at a time). This should be done in a function using this prototype: double larger (double x, double y); Make sure you use a for loop expression inside your function. Enter 15 numbers 11 67 99 2 2 6 8 9 25 67 7 55 27 1 1 The largest number is 99

Answers

Answer:

#include <iostream>

using namespace std;

double larger( double x, double y){

   if (x > y){

       return x;

   } else{

       return y;

   }

}

int main(){

   int n, max = 0;

   for (int i =0; i < 15; i++){

       cout<< "Enter item"<< i+1 << ": ";

       cin>> n;

       cout<< "\n";

       max = larger( n, max);

   }

   cout<<"The maximum number is: "<< max;

   return 0;

}

Explanation:

The C++ program defines the function 'larger' that compares and returns the largest of two numbers. The main program prompts the user for 15 numbers and the larger function is called to return the largest of the fifteen numbers given.

When preparing the heading for an MLA Format Academic Report, which of the following shows the proper order of the for lines of the header?

A. Student Name, Instructor, Course, Date
B. Instructor, Course, Student Name, Date
C. Course, Student Name, Instructor, Date
D. Student name, Date, Instructor, Course

Answers

Answer:

A. Student Name, Instructor, Course, Date

Explanation:

Begin one inch from the top of the first page and flush with the left margin. Type your name, your instructor's name, the course number, and the date on separate lines, using double spaces between each. Double space once more and center the title

A user clicks. such as option buttons and check boxes in a dialog box to provide information

Answers

Answer:

It's an input,

What's the difference between an IDS and an IPS?

Answers

Answer:

Following are the differences between IDS and IPS

IDS is a monitoring and detection system whereas IPS is a controlling system.IDS does not execute any action on its own whereas IPS accepts or rejects the packets based on the ruleset provided.IDS requires human involvement to review the results whereas IPS updates the database by the new threat faced.

Explanation:

Intrusion Detection System ( IDS )

The system analyzes the network traffic for signals that shows that the attackers use to hack and steal the data is known as Intrusion Detection System ( IDS ). It detects different kinds of behaviors, like security violations and malware.

Intrusion Prevention Systems (IPS)

IPS works like a firewall between the external world and the internal network. IPS actively protects the network from threats based on the security profile provided.

hich of these statements is a value statement?
a.
Tacos are delicious.
b.
Lying is wrong.
c.
Cooking is hard.
d.
Puppies are funny.

Answers

The answer to your question is b
the answer would be B, lying would be the “value” part of the statement

how to hack free fire dimond

Answers

Explanation:

no way

your account gets banned if u try

Answer:

Its easy

Explanation:

Give Money to the guy in the cyber then he will hack for you ,

1.Which of these is used to create a table in MS Access?
a. Datasheet View
b. Table Design View
c. Both a and b​

Answers

Answer:

I believe it's both a and b.

Explanation:

Hope this helps! ^^

C . Both a and b......

Which of the basic data structures is the most suitable if you want to be able to insert elements in the middle in O(1)?
A. Array
B. Queue
C. Linked list
D. Stack

Answers

Answer:

A. Array

Explanation:

An array is a data structure that holds a collection of similar data types. Though it is ordered, the location of the array is indexed, which means that the items of the array can be accessed and retrieved with their index location values (starting from 0 to n).

The time complexity of accessing or retrieving a specific item in an array is O(1) which is a constant of the specified item.

Write a function called getRowTotal. This function should accept a two-dimensional int array as its first parameter (the array has 5 columns) and an integer as its second parameter. The second parameter should be the subscript of a row in the array. The function should return the total of the values in the specified row. Only write the function no need to write the main function

Answers

Answer:

The solution is implemented using C++

int getRowTotal(int a[][5], int row) {

  int sum = 0;

  for(int i =0;i<5;i++)

  {

      sum += a[row][i];

  }

  return sum;

}

Explanation:

This defines the getRow function and the parameters are arr (the 2 d array) and row and integer variable

int getRowTotal(int arr[][5], int row) {

This defines and initializes sum to 0

  int sum = 0;

This iterates through the row and adds the row items

  for(int i =0;i<5;i++)    {

      sum += arr[row][i];

  }

This returns the calculated sum

  return sum;

}

Did anyone do 5.7.5 Factorial on Code HS??



20 POINTS

Answers

I’m so sorry that you have no more than me and I have to ask you something

Which of these type parameters is used for a generic class to returnrand accept any type of object?
Select one:
a. T
b. N
C.V
d. E
e. K​

Answers

Answer:

To accept and return any type of object T

Which of these file types does not share info in a spreadsheet?

Answers

Answer:

A file with extension ".exe".

or A system file

Other Questions
can somebody pls help me with this question I dont get it 32. Quecalzas? (10)33.Cuesta mucho. Es muy34. Hay muchas tiendas en un35. Cuando haytodo te cuesta menos." yuri from ddlc or Kkaku Shiba from bleach The volume of a sphere can be found using the formula V = r . If the sphere has a diameter of 10x y z mm, what is the volume of the sphere in cubic millimeters? What is the divisor in the following problem? 18 + 6 = 3 . What are your hopes/dreams/wishes for this next year? What did Malcolm X do to change the world? Impact etc.. Explain with NO PLAGIARISM.PLSS HELP There are 136 boys and 172 girls at Wood Middle School. There are 312 boys and 264 girls at Parker Middle School. What is the ratio of students at Wood Middle school to students at Parker Middle School? OA. B. 17 39 144 77 43 66 77 144 " life was not always rosy for the miners. Their day-to-day life was very difficult." In what ways do you think the life a miner would have been difficult? What is the difference between short term and long term climate changes. Give ONE example of EACH. a reactant in cellular respiration Please Help !!!!!!!!!!! PLLSSSSS HELLLPA candle burns down at the rate of 0.5 inches per hour. The original height of the candle was 6 inches.Part A: Write a list of 6 ordered pairs to show the height of the candle in inches (y) as a function of time in hours (x) from the first hour after it started burning. For example, the point (0, 6) would represent a height of 6 inches after 0 hours. Explain how you obtained the ordered pairs. (5 points)Part B: Is this relation a function? Justify your answer using the list of ordered pairs you created in Part A. (2 points)Part C: If the rate at which the candle burnt was 0.3 inches per hour instead of 0.5 inches per hour, will the relation continue to be a function? Explain your answer using input and output values. (3 points) In detail, fully define the celebration of the twelfth night of christmas/epiphany Hello guys come up on ID = 4349418663Pass = 1234 the person responsible for all aspects of an emergency response is the please help me i need this ASAP What % of 30 is 16.5 Oh my god... TELL ME I AM NOT PROVING POINTS! The following passage is from page 16 of the book A History of American Film by H. Smith: One of the most famous characters in American cinema is Indiana Jones. In fact, Indiana Jones is so popular that people call him the American James Bond. While James Bond is recognizable by his tuxedo, Indiana Jones can be identified by his fedora and whip. Three Indiana Jones films were released in the 1980s, and a fourth film was released in 2008. Harrison Ford stars in the films as Dr. Jones, an archaeology professor who becomes an adventurer as he searches for rare artifacts. Indiana Joness adventures and personality have made him a beloved character that is a staple of American film.3According to MLA guidelines, which of these best paraphrases the following sentence from the paragraph?Indiana Jones's adventures and personality have made him a beloved character that is a staple of American film. A. According to Smith, Indiana Jones's adventures and personality make him an iconic and beloved character in American film (16). B. According to Smith, Indiana Jones is an iconic character in American film because of his memorable feats and likable character (16). C. According to Smith, Indiana Jones is a staple in American film because of his memorable adventures and personality (16).Reset Submit