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
dexar [7]
3 years ago
6

Given an int variable n that has already been declared and initialized to a positive value , use a while loop to print a single

line consisting of n asterisks. Use no variables other than n.
Computers and Technology
1 answer:
Scrat [10]3 years ago
8 0

Answer:

The code to this question can be given as:

Code:

int n=5; //define an integer variable n and assign a positive value.

while(n > 0) //define while loop,

{

printf("*"); //print asterisks.

n --; //decrements value.

}

Explanation:

The description of the above code can be given as:

  • In this code we define an integer variable that is "n" and assign a positive value that is "6".
  • Then we define a while loop. It is an entry control loop which means it will check condition first then executes. In this loop, we use variable n and check condition that the value of n is greater than 0.
  • In this loop, we print the asterisks and decrease the value of n. When the variable n value is 0. It will terminate the loop and print asterisks.

You might be interested in
All of the following are examples of roadblocks to achieving a goal except
Volgvan
Having to many goals
6 0
3 years ago
Read 2 more answers
When a range of ip addresses is set aside for client devices, and one of these ips is issued to these devices when they request
snow_lady [41]

When a range of ip addresses stands set aside for client devices, and one of these ips stands issued to these devices when they request one, this exists known as Dynamic Allocation.

<h3>What is an IP address?</h3>

IP address stands for “Internet Protocol address.” The Internet Protocol exists as a set of rules for communication over the internet, such as sending mail, streaming video, or connecting to a website. An IP address specifies a network or device on the internet.

An IP address stands for a unique address that identifies a device on the internet or a local network. IP stands for "Internet Protocol," which exists as the set of rules controlling the format of data sent via the internet or local network.

A 'Client Device' may direct to any computer with access to data from another computer. In this sense, a server may sustain a network composed of numerous client devices in the form of desktop PCs, laptops, smartphones, and tablets.

Hence, When a range of ip addresses stands set aside for client devices, and one of these ips stands issued to these devices when they request one, this exists known as Dynamic Allocation.

To learn more about Dynamic Allocation refers to:

brainly.com/question/24688176

#SPJ4

8 0
2 years ago
Taking a suitable example in c language explain the of call by value and call by reference concepts.
Degger [83]

Answer: The difference between call by value and call by reference is that in call by value the actual parameters are passed into the function as arguments whereas in call by reference the address of the variables are sent as parameters.

Explanation:

Some examples are:

call by value

#include <stdio.h>  

void swap(int, int);

int main()

{  int a = 10, b= 20;

 swap(a, b);

 printf("a: %d, b: %d\n", a, b);

}  

void swap(int c, int d)

{

 int t;

 t = c; c = d; d = t;

}  

OUTPUT

a: 10, b: 20

The value of a and b remain unchanged as the values are local

//call by reference

#include <stdio.h>

 void swap(int*, int*);

 int main()

{

 int a = 10, b = 20;

 swap(&a, &b);   //passing the address

 printf("a: %d, b: %d\n", a, b);

}

void swap(int *c, int *d)

{

 int t;

 t = *c; *c = *d; *d = t;

}

OUTPUT

a: 20, b: 10

due to dereferencing by the pointer the value  can be changed which is call by reference

8 0
4 years ago
Carlos wrote a check for $44.92 to pay his gas bill. He’ll use the check register to record his transaction. What will be his ne
Finger [1]

Answer:

-44.92

Explanation:

If he has no money hell be in the hole

8 0
3 years ago
______ is used to extract knowledge from sources of data-NoSQL databases, Hadoop data stores, and data warehouses-to provide dec
Alex777 [14]

Answer: Data analytics

Explanation:

3 0
3 years ago
Other questions:
  • The n modifier after the tilde forces the index variable to expand only to the ______
    15·1 answer
  • In computer security, the term "Dumpster diving" is used to describe a practice of sifting through trash for discarded documents
    7·1 answer
  • Comments should be written in what type of language
    6·1 answer
  • Nathan notices that the words of the quotation are too close to the borders.
    14·2 answers
  • Brainliest for whoever adds me on snap<br> gianavaughn007
    15·2 answers
  • Positive use of the technology before the pandemic.
    8·1 answer
  • Please help!! I dont need the answer i just need explaining on how to do this!!!!
    9·1 answer
  • Explain the importance of technology in at least 100 words
    11·1 answer
  • What is humanity’s greatest invention?
    13·1 answer
  • Can anyone talk to me?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!