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
There are information that are in the web view source that may not appear on the web page such as meta name. In addition there c
SCORPION-xisa [38]

Answer:

True on a web page such meta name will not appear in web view source and irrelevant information will be displayed.

Explanation:

Basically web page source is compiled version of HTML script so the end-user he or she tries to view pages system will show only in HTML.

so meta name information and active object information will not be displayed while viewing the web source code instead of that the irrelevant informant ions will be displayed and end-user cannot under anything out of the web source code.

Moreover, even the client side validation script also will not be displayed.

Only HTML will be displayed  

3 0
3 years ago
Which Save As element allows a user to save a presentation on a computer?
mrs_skeptik [129]

Answer:

Option D, This PC allows a user to save a presentation on a computer

Explanation:

If one choses the option C, the file will be saved in the folder in which the user is working. Hence, option C is incorrect.

Like wise option A is also incorrect as it will require user to provide a location as option for saving the file

Option B is also incorrect as it will allow the user to save files in the C drive/D drive or one drive

Option D is correct because if the user choses this option file will be saved on the computer.

Hence option D is correct

7 0
3 years ago
Dam naj za pierwszej osobie która odpowie dobrze!
Rama09 [41]
I don’t understand that language
8 0
3 years ago
What would happen without satellites???
laila [671]

Answer: without satellites there would be no way for the world to communicate

Explanation:

4 0
3 years ago
Read 2 more answers
There are two algorithms called Alg1 and Alg2 for a problem of size n. Alg1 runs in n2 microseconds and Alg2 runs in 100n log n
nataly862011 [7]

The answer & explanation for this question is given in the attachment below.

8 0
3 years ago
Other questions:
  • An _________ is a phrase formed from the first letters of words in a set phrase or series of words a. Acronymic sentence c. Basi
    7·2 answers
  • _____ involves those activities that ensure the orderly dissolution of a system, including disposing of all equipment in an envi
    7·1 answer
  • The concept of ____ refers to the idea that the internet is designed for all content to be treated equally.
    12·1 answer
  • What does this sign mean?
    5·2 answers
  • 1. Which of the following should NOT be in a tagline?
    12·1 answer
  • What is the purpose of the Excel Function Reference?
    9·1 answer
  • The__________is an HTML tag that provides information on the keywords that represent the contents of a Web page.
    14·1 answer
  • Implement a metho d to nd the k-th largest element in an array of size N using a minimum priority queue (MinPQ). Assume that the
    8·1 answer
  • _____ is the practice of using the internet to provide healthcare without going to a doctor’s office or hospital.
    15·2 answers
  • Create a function that takes an integer array as input and a value and returns a POINTER to the number of times the value appear
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!