C Program to Get Input from User

In this tutorial you will learn about the C Program to Get Input from User and its application with practical example.

C Program to Get Input from User

In this tutorial, we will learn to create a C program that will Get Input from Users in C programming.

Prerequisites

Before starting with this tutorial we assume that you are best aware of the following C programming topics:

  • Operators in C Programming.
  • Basic Input and Output function in C Programming.
  • Basic C programming.

Get Input from the Users

As we all know the program is a collection of different data types. In c programming, we can take the input from the user in various data types. In today’s program, we will take input in many formats. The second will display the data.

With the help of this program, we can Get Input from User

Algorithm 1:-

Algorithm 2:-

Program to Get Input from User:-

Program 2:-

 

Output:-

In the above program, we have first initialized the required variable.

  • no1 = it will hold the integer value.
  • no2 = it will hold the float value.
  • no3 = it will hod the double value.
  • chr = it will hold the character value.

Taking Input from the user.

 

Printing the data in the output.

In this tutorial we have learn about the C Program to Get Input from User and its application with practical example. I hope you will like this tutorial.