Posts

Showing posts with the label scanf

scanf in c

Image
So what is scanf function in C? What is the use of scanf function in C language? In this post we are going to see the detailed explanation about scanf function and its use in writing a C program. The scanf function is a library function .Library functions are by default declared in the C language. Scanf function in c allows compiler to accept the input given by the user using keyboard and is often referred to as counter part of printf function because printf function is used to display output on the screen whereas it takes input. For us to be able to use scanf() function,it is necessary to use #include<stdio.h> at the beginning of the program.As discussed earlier it is a preprocessor directive and it's objective will be discussed later.For now just remember to use it wherever you are using scanf() function. In C programming the scanf() function is used to read different type of data.The different type of data includes integer,real,character.It is also used t...