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
adelina 88 [10]
4 years ago
8

How I get input from the user in C? Here's my code now:

Computers and Technology
1 answer:
Nataliya [291]4 years ago
4 0

You must use “scanf” statement to read the input. You must also include the necessary header file to use all the built-in functions in any programming languages.

scanf(“%d”, &number);

Since “scanf” is a statement it must end with the semicolon. “scanf” accepts two parameters, first the type of value and second is the address of the variable to store the given input.

Here “&” represents the address of the given variable. “%d” is used for integer, “%f” is used for float, “%s” is used to receive string inputs, etc.

You might be interested in
Is this a scam pls tell me????????????/
zloy xaker [14]

Yes don't trust at all, I've got that so many times

3 0
4 years ago
Read 2 more answers
The Central Processing Unit carries out the commands from programs running in...
prohojiy [21]

Answer:

the main memory to be precise

5 0
3 years ago
Why I cannot answer the questions in this server? When I click the question always back in the server brainly.id. Any solve my p
vredina [299]

Answer:

okay believe your heart and read questions properly do problems

Explanation:

I hope you understand bye

8 0
3 years ago
We are sending a 30 Mbit MP3 file from a source host to a destination host. All links in the path between source and destination
Daniel [21]

Answer:

Option  A is the correct answer.

Explanation:

8 0
4 years ago
Write the definition of a class Telephone. The class has no constructors and one static method printNumber. The method accepts a
cricket20 [7]

Answer:

The program to this question can be given as:

Program:

public class Telephone //define class Telephone.  

{  

public static void printNumber(String s) //define method  

{  

System.out.print(s); //print value.  

}  

public static void main(String[] args) //define main method  

{  

String s ="ABCD"; //define variable s and assign value.  

printNumber(s); //calling function.  

}  

}

Output:

ABCD

Explanation:

In above java program we define a class that is "Telephone". Inside the class we define a function that is "printNumber" in the function we pass one string value that is "s" and the function will not return any value, because we use return type void. In this function we print pass variable value.

Then we define the main method inside the method we define a string variable and assign a value that is s = "ABCD" and call the function that prints its value.

5 0
3 years ago
Other questions:
  • A security administrator is implementing a SIEM and needs to ensure events can be compared against each other based on when the
    11·1 answer
  • What has the dogo argentino been bred to do?​
    12·1 answer
  • Write a method named lastFirst that accepts a string as its parameter representing a person's first and last name. The method sh
    13·1 answer
  • Let's say that you're the sole IT employee at your company. Your boss wants the company to migrate away from using the current,
    12·1 answer
  • Compare and contrast the following codes of ethics, including a listing of their similarities and differences: The ACM Code of E
    14·1 answer
  • Is a network where connected devices are located within the same building.
    5·2 answers
  • What properties make it suitable to be used for supportive frames
    15·1 answer
  • What types of storage can be used to access your data on another computer?
    10·2 answers
  • Describe how being a global citizen in the world of advanced technology can be beneficial to your success in meeting your person
    13·1 answer
  • List the caveats to this analysis and how they affect the research. How does this document define the ""typical game developer""
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!