You have 4 free member-only stories remaining for the month. Subscribe now for unlimited access

Data input and output in programming language C which is not more than but important 

Data input and output C programming language provide a large number of libraries to prepare to code faster as you can think of as a format specifier we can use at every line of scanf and printf formula neither then program not run properly that’s why there are so many things that must be Findable.

There are a few more methods to get input in C programming language and show the valuable output in C programming language as you know already.

These all six is here scanf(), printf() and gets() or puts() as well as getchar() , putchar() every library or you can say that function have been different work as you know there are several knowledge shareable team and resources we have already seen it without wasting any time let’s go ahead and learn some amazing.

As you read this function you have some questions in your mind. Let’s resolve those questions here: what is the work of getchar() and putchar()?

In a simple method these both functions get only a single character as input from the computer.

Another gets() or puts() getting string for more usable things in programming language strings is a heat of every programming language that represents every kind of problem formula a particular programming language contains.

Finally, C programming language contains two more scanf and printf. These two functions are really different as you know both are used to getting int and char also strings.


void main()


// defining a variable

int i;


displaying a message on the screen

asking the user to input a value


printf(“Please enter a value…”);


reading the value entered by the user


scanf(“%d”, &i);


displaying the number as output


printf( “\nYou entered: %d”, i);


When you compile the above code, it will ask you to enter a value. When you will enter

the value, it will display the value you have entered on the screen.

This is a small example of a particular scanf and printf use. In this formula, you can see that

%d these are called format specifiers without format specifier programming language not running successfully.

We can use%d for character and int or decimal point. %c for character or%s for strings as well as %f for floating point.

There is a very basic article that can help to learn coding at javatpoint stay tuned with us thank you. 

Recommend0 Simily SnapsPublished in Book Reviews