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.
I believe the answer is C) <span>servers are used directly by computers, not by people
Have a good day! =)</span>
Answer:
1/2000
Explanation:
import java.util.Scanner;
public class InputExample {
public static void main(String [] args) {
Scanner scnr = new Scanner(System.in);
System.out.print("Enter birth month and date:");//comment this line if not needed
int birthMonth=scnr.nextInt();
int birthYear=scnr.nextInt();
String output= birthMonth+"/"+birthYear+"\n";
System.out.println(output);
}
}
if using this code the out put should be 1/2000
Answer: TDMA(Time division multiple access)
Explanation: Time-division multiple access is the method that is used by GSM(Global system for mobile communication) usually for the separation process of the data.It is a way in which a same frequency is shared by different time slots of signal.It has high flexibility and so thus is helpful for the GSM network and provides easy services of division.It divides the data according to the time period slots in a GSM network.