Answers for "what does scanf does"

0

scanf

#include <stdio.h>
int main()
{ 
 char fn, ln;

printf(" hello your name: ");
scanf("%s", fn);

printf("one more name: ");
scanf("%s", ln);

printf("hello it is you %s %s", fn, ln);
return 0;
}
Posted by: Guest on January-23-2022
0

scanf()

#include <stdio.h>
int main() {
   // using scanf() 
   int user_input;
   
   printf("Please enter a number: ");
   scanf("%d", &user_input);
   printf("You entered: %d", user_input);

   return 0;
}
Posted by: Guest on October-21-2021

Browse Popular Code Answers by Language