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
pav-90 [236]
3 years ago
12

Write the half function. A function call and the functionprototype

Computers and Technology
1 answer:
EastWind [94]3 years ago
3 0

Answer:

C code for half()

#include<stdio.h>

void half(float *pv);

int main()

{

float value=5.0;  //value is initialized  

printf ("Value before half: %4.1f\n", value); // Prints 5.0

half(&value);  // the function call takes the address of the variable.

printf("Value after half: %4.1f\n", value); // Prints 2.5

}

void half(float *pv) //In function definition pointer pv will hold the address of variable passed.

{

*pv=*pv/2;  //pointer value is accessed through * operator.

}

  • This method is called call-by-reference method.
  • Here when we call a function, we pass the address of the variable instead of passing the value of the variable.
  • The address of “value” is passed from the “half” function within main(), then in called “half” function we store the address in float pointer ‘pv.’ Now inside the half(),  we can manipulate the value pointed by pointer ‘pv’. That will reflect in the main().
  • Inside half() we write *pv=*pv/2, which means the value of variable pointed by ‘pv’ will be the half of its value, so after returning from half function value of variable “value” inside main will be 2.5.

Output:

Output is given as image.

You might be interested in
What does the Autosum feature on excel do?
BabaBlast [244]
The answer is 1. Pressing the Autosum button highlights the ten cells above it so that you can easily add things together. Hope this helps!
8 0
3 years ago
What is NOT an issue associated with tag management systems? There is no automation available for tag management systems. Managi
SSSSS [86.1K]

Answer:

Managing tags means experience with the programming language to utilize them.

Explanation:

In different markets, tags are used to assigned prices and values to different products. To make these tags "tag management systems" are deployed to manage and create these tags.

Tag management system is software, that is used to create the tags with ease. There is no need of coding or programming while creating tags.

<em>So we can say that, There is no issue of Managing tags means experience with the programming language to utilize them.</em>

5 0
3 years ago
Njdnkjsdnjvnsdjvnjsdnvjsdvnjdnvjdsnvnksn
adoni [48]

Answer:

yes

Explanation:

7 0
2 years ago
During boom times, which of the
pashok25 [27]
I think the answer is D.
3 0
2 years ago
Transaction processing systems (TPSs) provide valuable input to management information systems, decision support systems, and kn
nadezda [96]

A transaction is a simple task carried out as part of corporate operations. Transaction processing systems (TPS) handle business transactions for the corporation, supporting overall enterprise operations.

A TPS creates papers pertaining to a non-inquiry transaction and records the transaction itself, together with all of its results, in the database.

Today, TPS are required for business operations in practically every firm. TPSs feed information into organizational databases; they also serve as the framework for management-oriented information systems. Source data automation frequently involves direct data entering. Electronic data interchange is being utilized by transaction processing systems more and more. These systems offer computer-to-computer communication without the need for repeated data entry by substituting paper documents with formatted transaction data sent over telecommunications networks.

Learn more about information here-

brainly.com/question/15709585

#SPJ4

5 0
1 year ago
Other questions:
  • This is important I need help please
    14·1 answer
  • WHICH OF THESE IS A TYPE OF ETHERNET <br> 802.11AC <br> 1000BASET <br> 4G
    7·1 answer
  • An interpreter _______. converts the procedural language one statement at a time converts the source code into machine language
    12·1 answer
  • Write an assembly program that will prompt the user for 3 inputs (let’s abstractly call them a, b, and c) without a leading stri
    13·1 answer
  • How does the post process alert the user if it detects a hardware problem during the post process?
    6·1 answer
  • What will happen when you drag and drop a worksheet tab into another workbook WITHOUT holding the Ctrl key down?
    13·2 answers
  • Excel files have a default extension of ?
    12·1 answer
  • What skills did Carl work on, and what steps did he take to reach his long term goals?<br>​
    10·1 answer
  • The use of technology to observe a user's actions often without the user's knowledge is known as:
    11·1 answer
  • Why is computer economics important?​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!