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
Scorpion4ik [409]
3 years ago
7

Give the difference betewen recursion and interation in C. Sight what are the advantages and their disadvantages?

Computers and Technology
1 answer:
mrs_skeptik [129]3 years ago
8 0
I believe you mean iteration. Recursion is when you have a function that calls or uses it's self. it's advantageous because it reduces the amount of code but can fall victim to an endless loop. Iteration is using a while loop or any kind of loop to iterate through a data set normally an array, iteration allows you to do an action for every iterated item but a downside is that it takes a long time to iterate and it is not efficient
You might be interested in
#Create a class called Name. Name should have two attributes
prisoha [69]

Answer:

//class Name

class Name {

// attributes gave you 3

String first_name;

String last_name;

int length = 0;

//constructor with 2 parameters

Name(String first_name, String last_name){

}

//methods

public String find_printed_name(){

return first_name + " " + last_name;

}

public void find_sortable_name(){

return last_name + ", " first_name.charAt(0);

}

public static void main(String[] args){

// instantiate the class

Name test_name = new Name("David", "Joyner");

System.out.println(test_name.first_name);

System.out.println(test_name.last_name);

System.out.println(test_name.find_printed_name());

System.out.println(test_name.find_sortable_name());

}

Explanation:

You didn't specify a language so I did it in Java.

You should know how to declare methods in Python.

3 0
3 years ago
it is very expensive to back up and store electronic files. please select the best answer from the choices provided t f
harina [27]
It is false that it is very expensive to back up and store electronic files. As a matter of fact, backing up your files is free - you can do it on any computer. And nowadays, even storing your electronic files can be free - there are Clouds on the Internet where you can upload your documents and store them there forever. 
5 0
3 years ago
Read 2 more answers
PLEASE HELP!
Basile [38]

Answer:

declare count as integer

7 0
3 years ago
1
Sergio [31]

Answer:

The answer to this question is given below in the explanation section

Explanation:

The ctrl+shift+e command is used to select track changes in a document.

Track Changes is a feature that is used in MS word or in wordprocessing application to track the changes inserted or modified by different users in a document. This helps the user to know where new text inserted or modified. Track changes help users to know new updates being inserted by other users in the document.

Furthermore, you can access the track changes features in the word file under the review tab. where you can find other related settings and features related to the track changes.

3 0
3 years ago
Write a program palindrome.py that prompts for a sequence of words or numbers on a single line and checks if the entries are pal
olya-2409 [2.1K]

Answer:

Explanation:

The program first asks the user for the sequence of words. Then it splits the sequence into an array of words. Then it loops through the array checking each word to see if it is a palindrome. If it is it prints the word, the boolean value, and adds 1 to the palindrome_count variable. Otherwise it prints the word, false, and moves on to the next word in the list. Finally, it prints out the total value of palindrome_count.

word = input("Enter sequence of words: ")

word_list = word.split(' ')

print(word_list)

palindrome_count = 0

for word in word_list:

   print('\n\n')

   reverse = word[::-1]

   if word == reverse:

       print(word, end='\n')

       print(True, end="\n")

       palindrome_count += 1

   else:

       print(word, end='\n')

       print(False, end='\n')

print("\n\nNumber of Palindromes in Sequence: " + str(palindrome_count))

3 0
3 years ago
Other questions:
  • PLC software does not typically fail or break​
    15·1 answer
  • Write an examples of Output device, storage devices and inputs device 10 each excluding the common ones​
    5·1 answer
  • You have been employed as a technical consultant to a computer shop chain. You are given the task of creating a short consumer b
    12·1 answer
  • using C++ to sort user input. for example, user enter 25numbers and sort them from small to big or big to small, cout thesamlles
    6·1 answer
  • What are paragraphs separated by
    9·1 answer
  • What was the history of technology since the 1980s to now and how is it used in classrooms?.?. PLEASE HELP
    13·1 answer
  • Create a program that calculates the tip and total for a meal at a restaurant. Type the code into an IDLE IDE editor window and
    5·1 answer
  • 1. Write an if statement that assigns 20 to the variable y, and assigns 40 to the variable z
    10·1 answer
  • Why is experience in their own factory setting
    13·1 answer
  • Twisted copper telephone wire, coaxial copper cable, fiber-optic cable, and media for wireless transmission are all __________.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!