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
AnnyKZ [126]
3 years ago
15

Practice problems on functions. Write C function(s) to carry out the specified tasks. For each problem, also write the suggested

application program(s) that apply the function. (1) Write a function multiPrint(int n, char c) that prints n copies of a character c.
Computers and Technology
1 answer:
scoray [572]3 years ago
3 0

Answer:

Function:

int fun(int n,char c) // function definition with a two argument in which variable n is a integer type and variable c is a character type.

{

   while(n>0)// while loop

   {

       printf("%c",c); // print statement for character

       n--; // decrease statement to false the loop.

   }

   return 0; //return statement.

}

output:

  • When the user pass n=5 and c='a', it will prints 5 times 'a' character.
  • When the user passes n=10 and c='t', it will print 10 times 't' character.

Explanation:

  • Firstly we declare a function of two arguments in which variable n is an integer type and variable c is a character type.
  • Then in the function body, we use while loop from n times iteration because question demands to print n time any character.
  • Then in the loop body, we use a print statement to print a character and a decrease statement to false the loop after a finite iteration.

You might be interested in
1. Which of the following are considered CAD powerhouses?
allsm [11]

Answer:

1. D.Autodesk and microstation.

2. D. the creation of a computer model, paricularly for purposes of studying.

3. A.internet delivered through standard household phone lines.

4. C.3-D sculptures used to pray for fertility.

5. C.technology.

Explanation:

8 0
3 years ago
What is bespoke software???​
denis-greek [22]

Answer:

custom-built to address the specific requirements of a business

Explanation:

5 0
2 years ago
Read 2 more answers
What are smart mobile devices?
Mashutka [201]
Do you mean like a phone

IPhones
Samsung
Moto z
Lge sorry if this isn't what you asked
7 0
3 years ago
Read 2 more answers
In which type of attack do you get malicious code in links from seemingly reliable websites?
natali 33 [55]

I think it is C. cross-site scripting

6 0
3 years ago
Explain what mistake Miranda made in the following scenario. Situation: Miranda suspects that there may be a problem with the ha
Dennis_Churaev [7]

Answer: Answer below.

Explanation:

I'm not fully sure myself, so don't agree with me fully.

I believe what she may have done wrong is tell the technician about a "program." A program doesn't have to do anything with physical hardware.

5 0
3 years ago
Read 2 more answers
Other questions:
  • What is the name of the process of heat transfer in which heat is transmitted through light waves?
    7·2 answers
  • 4. What aspect of the initial database planning process would the formula (0 + Pt × 3 + p)/5 be used in?
    5·1 answer
  • In Java Write a program that prompts the user for a name (any String value would work for testing), and print a hello message to
    15·1 answer
  • What the gas line in the car
    12·1 answer
  • Which technology is predominately used for contactless payment systems?
    11·1 answer
  • My friend has 200 subs and i have only 36 can you help me its ACYT ZR
    9·2 answers
  • Key Vocabulary:
    7·1 answer
  • Write a python program that will read a number (num) and display all the numbers divisible by 3 or 5
    15·1 answer
  • Language modeling incorporates rules of __. Select all that apply.
    7·1 answer
  • Criminal investigations are limited to finding data defined in the search ____.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!