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
Discuss 2D gameplay and how new platforms such as cell phones are taking advantages of this renewed market
ankoles [38]
2D games are games that are made in the second dimension. These games are can be any type of game from platforms like Mario or adventure games like Terraria.  These games are big in the mobile games market because they are simple due to them only having 2 dimensions. This makes it easy for the players because you either have to use a "joystick" to move the characters like in Terraria or push a button to do a certain action.<span />
8 0
3 years ago
¿Cuál es la diferencia entre una plataforma educativa y una tutoría?
tiny-mole [99]

Answer:

no habla espanola

Explanation:

8 0
3 years ago
____ a British mathematician devolved the concept of a programmable digital computer and worked with Ada Lovelace to design the
White raven [17]

Answer:

C: Charles Babbage

Explanation:

Charles Babbage

Charles Babbage (1791-1871), computer pioneer, designed two classes of engine, Difference Engines, and Analytical Engines.

8 0
3 years ago
When inserting a fly in animation what is the first step in the process?
weqwewe [10]

Answer:

you select the element you wish to animate

6 0
3 years ago
1. Perform the following Binary Additions 101101 + 10100 *
USPshnik [31]

Answer:

1.         carry   1  1  1

                      1  0 1 1 0 1

                      +  1 0 1 0 0

                       ------------------------

   Answer: 1  0 0 0  0 0 1  

2.         carry  1 1  1 0 1  1  

                     0 1 0 1 0 0 1 1

                  + 0 1 1  1 0  1  1 0

                  --------------------------

    Answer: 0 1  1 0 0 1 0 0 1

3.                   1 0 1 1 0 1

                    -   1 0 1 0 0

                   -------------------------

       Answer: 0 1 1 0 0 1

4.                      1 1 0 0 1 0 1 1

                      -    1 0 1 0 1 1 0

                     -----------------------------

        Answer:   01 1 1 0 1 0 1

Explanation:

In Binary addition when you add 1 + 1 = 0, carry over the 1, i.e 10

in Subtraction when you subtract 0-1 = 1,  brow 1 from left side, resulting in -1 carried over.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Case Project 10-1 As the network administrator for a growing company, you’re asked to solve a remote access dilemma. The 12 empl
    8·1 answer
  • Enter the value of 5⋅(13.5−4.5). <br> ​
    5·1 answer
  • __ provides an integrated development environment (IDE) for rapidly developing Java programs. Editing, compiling, building, debu
    15·1 answer
  • John Cleaver is the CEO of Tech World, which is a retail store that sells computers, monitors, cameras, televisions and many oth
    6·1 answer
  • PLEASE HURRY PLEASE HELP THIS CLASS ENDS TODAY AND I NEED HELP
    7·1 answer
  • A ____ is an electronic device, operating under the control of instructions stored in its own memory, that can accept data, proc
    11·1 answer
  • Develop Swimlane Activity diagram for Assignment announcement and submission system.
    6·1 answer
  • Write an algorithm to calculate the sum of integer ​
    7·1 answer
  • When people receive benefits just because they belong to a particular identity group, this is called
    14·1 answer
  • The Next Einstein Initiative and the ________ Institute for Mathematical Sciences bring bright young learners and the best lectu
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!