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
lesya [120]
3 years ago
12

(In C prog.) What is the difference between scanf, getche and getchar?

Computers and Technology
1 answer:
lara [203]3 years ago
7 0
<span>getchar() only reads a single character input from any input stream.
getche() </span><span>reads a single character from the keyboard and displays immediately on output screen without waiting for enter key
scanf() reads the whole input line according to the data type you specified.</span>

You might be interested in
My computer just fried anybody know why it did that?
pochemuha
You was probably was too MLG and it blew its top my boy !
7 0
3 years ago
Read 2 more answers
Write a function DrivingCost() with input parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar
stira [4]

Answer:

// program in C++.

#include <bits/stdc++.h>

using namespace std;

// function to calculate cost

double DrivingCost(double drivenMiles, double milesPerGallon, double dollarsPerGallon){

  double cost;

  //Expression to compute cost

  cost = drivenMiles / milesPerGallon * dollarsPerGallon;

  return cost;

}

// main function

int main()

{

   double drivenMiles, milesPerGallon, dollarsPerGallon;

  //initialise the variables

  drivenMiles = 50;

  milesPerGallon = 20.0;

  dollarsPerGallon = 3.1599;

  //Call function

  double cost = DrivingCost(drivenMiles,milesPerGallon,dollarsPerGallon);

  //Display result

  cout<<"Driven miles : "<<drivenMiles<<endl;

  cout<<"Miles per Gallon : "<<milesPerGallon<<endl;

  cout<<"Dollars per Gallon : "<<dollarsPerGallon<<endl;

  cout << fixed << setprecision(2);

  cout<<"The total driving cost : "<<cost ;

  return 0;

}

Explanation:

Declare and initialize drivenMiles with 50, milesPerGallon with 20.0 and dollarsPerGallon with 3.1599.Call the function DrivingCost() with these parameters,This will calculate the cost and return the value.Print the result after getting the cost.Similarly we can calculate cost for drivenMiles equals to 10 and 400 miles also.

Output:

Driven miles : 50

Miles per Gallon : 20

Dollars per Gallon : 3.1599

The total driving cost : 7.90

5 0
3 years ago
Use the nutrition label to determine how many calories would be consumed by drinking 1 liter of Mountain Dew.
Rus_ich [418]
1 liter of mountain dew is 170 calories
4 0
3 years ago
Read 2 more answers
Jack is assisting his younger sibling Mary with her mathematics assignment, which includes a study of the number system. Jack ex
Elza [17]

Answer:

The answer is A). Integers

Explanation:

Booleans and Strings don't represent numbers (in most cases) so they can be eliminated.

Floats are used for representing decimals while integers are used for whole numbers.

4 0
3 years ago
Read 2 more answers
An inserted Graphic in Excel
Aneli [31]
Inserting<span> Clip Art. Choose the location where you want to </span>insert<span> the clip art. You can </span>insert<span> clip art in any worksheet cell or in the header or footer. To select a header or footer in </span>Excel<span> 2003, select "Page Setup" from the File menu and then click the Header/Footer tab on the Page Setup dialog.</span>
4 0
3 years ago
Other questions:
  • A friend knows I'm taking a technology class in college and asks me how a hard drive works. What should I say to a friend about
    10·1 answer
  • Computer ForensicsThere are many differences between public-sector and private-sector computer investigations. What do you see a
    7·1 answer
  • Using the SUM function allows a series of numbers to be 1. Multiplied 2. Subtracted 3 Added 4. Divided
    11·1 answer
  • How do you activate the Slicer Tools contextual tab?
    13·1 answer
  • For connection to place on any network you must have a set of standards?<br> O True<br> O False
    8·1 answer
  • THE PROTOCOL ORIGNALLY RAN ON TOP OF NETBT,BUT today runs by itself and uses port 445?
    11·1 answer
  • A user is connected to his personal mobile hotspot device at a library for internet access. He notices the display shows two con
    10·1 answer
  • How do you create a IOS app?
    12·1 answer
  • Which Tab provides the command to add a hyperlink to a document?
    11·2 answers
  • Whats th diffence between a fwireless speaker and a wird speakr
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!