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]
2 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]2 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
Why is a Quality assurance tester needed on a software development team?
arsen [322]

Answer:

Quality assurance testing plays a very crucial role in the process of software development. It saves money and time by spotting bugs and errors early in the software development life-cycle. Software that is newly developed may have inconsistencies, redundancies, and flaws; therefore, proper QA testing is mandatory.

Explanation:

3 0
2 years ago
Einstein's famous equation states that the energy in an object at rest equals its mass times the squar of the speed of light. (T
musickatia [10]

Answer:

The complete program is as follows:

m_str = input('Input m: ')

mass = float(m_str)

e = mass * 300000000**2

print("e = ",e)

Explanation:

This is an unchanged part of the program

m_str = input('Input m: ')

This converts m_str to float

mass = float(m_str)

This calculates the energy, e

e = mass * 300000000**2

This is an unchanged part of the program

print("e = ",e)

4 0
2 years ago
In the classic experimental design, there are two groups: the _____ group and the _____ group.
Tju [1.3M]

Main Answer:In the classic experimental design, there are two groups: the <u>treatment group and the control group.</u>

<u>Sub heading:</u>

<u>Explain treatment group and control group?</u>

Explanation:

1.The treatment group also known as the experimental group receives the treatment that the researcher is evaluating.

2.the control group  on the other hand does not receive the treatment.

Reference link:

https://brainly.com

Hashtag:

#SPJ4

5 0
1 year ago
A program executes 15 billion instructions. You are running this program in two systems: System A: has a processor with 3 GHz an
katrin2010 [14]

Answer:

CPU clock cycles = Instruction count x CPI.

CPU execution time =

= CPU clock cycles x Clock cycle.

= Instruction count x CPI x Clock cycle.

T =

I.

x CPI x C

Explanation:

i'm guessing

7 0
3 years ago
What variable type is the output of a logical operator in labview?
Stella [2.4K]

Answer:

Boolean data types

Explanation:

consist of only two values i.e. true and false. It is a logical data type providing the output in the form of 0 or 1 specifying false and true respectively. The Boolean data type is indicated by green data wires. LabView stores the Boolean data as 8-bit values.

5 0
2 years ago
Other questions:
  • What is the equivalent of film speed in digital cameras?
    6·2 answers
  • Which of the following criteria would not make a person eligible to receive medicare benefits?Which of the following criteria wo
    12·2 answers
  • Select the correct answer.
    8·1 answer
  • Does white space have visual weight? Yes or No
    7·2 answers
  • Here is what my rob-lox user USED to look like, btw what is better, Samsung or apple?
    13·2 answers
  • In Subtractive empathy, the counselor responses gives back less (or distorts) than what the client has said. slightly add someth
    14·1 answer
  • Two technicians are discussing Newton's first law of motion. Technician A says that a lightweight vehicle requires as
    8·1 answer
  • Can you please help me with this crossword puzzle, I am having trouble with numbers 5 down and 22 across.
    5·2 answers
  • Which of the following tabs on the Ribbon contains the commands for adding tables, pictures and shapes into a publication? Quest
    14·1 answer
  • Tick the best alternatives 1. Which one of the following is input device? a) Speaker b) Printer c. Monitor d. Mouse​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!