Safcode | Code Your Ideas by Sir Safder

  • User Input in C

    There are many function In C language to take an input from user,
    like getchar(), gets(), etc. But scanf() function is one of the
    commonly used function to take input from the user.
    When we use scanf() or printf() function we need format specifier.
    int main()
        int age;
        printf("Enter Your Age: ");
        scanf("%d", &age);
        printf("Your Age Is: %d ", age);
        return 0;

  • You Can Also Watch Our Tutorial