C program in scanf() function is simple function to use for take user input.
This is predefine function.
Syntax of scanf() function is:
scanf("string type argument",& argument name);
For example taking as integer input
scanf("%d",&a);
As c program using scanf() function:
#include<stdio.h>
int main()
{
int a;
printf("please enter an integer number : ");
//Here use to scanf function to scan an integer to used %d
scanf("%d" , &a);
printf("Enter Number is %d",a);
return 0;
}
Output as :
0 Comments