scanf c programming code example
Example 1: c scanf
scanf("%d",&variable);
/*
% is a format specifier
%d or %i for int
%ld or %li for long int
%f for float
%lf for double
%c for char
%s for string
*/
Example 2: scanf c
scanf("%d", &b);
Example 3: scanf in c
#include
int main () {
scanf("%s", str);
printf("%s"str);
scanf("%d", int);
printf("%d"int);
return(0);
}