Answer:
scanf() function is used to get a input from keyboard.This function is in the stdio.h library.To use this function we must include the stdio.h library first in the code. Then only we can use the scanf() function in any code.printf() function is used to print anything .this function is from stdio.h library.
Code to read voltage drop across the register.
#include <stdio.h>
// main function
int main(void) {
// variable
double vr1;
printf("Enter voltage drop:");
// read voltage drop from user
scanf("%lf",&vr1);
// print voltage drop
printf("voltage drop is:%0.2lf",vr1);
return 0;
}
Output:
Enter voltage drop:200.4
voltage drop is:200.40
The flow chart would go:
----------------------------
Start
Input C (Celsius)
IF C = -999 THEN END
Calculate F (Fahrenheit) using the formula
Output F
Goto next temperature (Input C)
----------------------------
The above needs tidying up and coding in the computer language you are using.
Answer:
See attached picture for heap creation steps.
10 comparisons were used.
Explanation:
See attached pictures.
<u>When a programmer declare single dimension or double dimensions array they use box bracket with index number to access the cell number.</u>
int a[10]; = where a is variable name declared with data type as integer and which hold 10 values.
Each is access with cell number or index number surrounded by box brackets
Example a [4] where “a” is variable number and “4” is index number or cell number. By refer “4” user is access the 4 cell data
Maximum “a” single dimension store total of 10 number where cell number or index number starts from 0 to 9.
Answer:
12/22
Explanation:
As there are 22 apples in total and 12 green it is 12/22.