Book Your slot
X
ONLINE BOOKING
BOOK NOW
OFFLINE BOOKING
Call or WhatsApp 7993732682 (WhatsApp Now), 9177341827 (WhatsApp Now)
search
Menu Login home
  • Questions

  • Library

  • University Updates

  • Informatives

  • Technology Lines

  • Training & Internships

  • X
    Menu
  • Home
  • Privacy Policy
  • Legal Disclaimer
  • Terms & Conditions
  • Return Policy
  • About Us
  • Need any help?? write to us at

    support@engineershub.co

    Follow Us

    X
    LOGIN
    Login to access posts, links, updates, question papers, materials, one liners!
    Use Your Email Address/Mobile and Password to Login
    Forgot Password?
    Not a member? Sign Up
    LOGIN WITH EMAIL/MOBILE
    Forgot Password?
    Go Back
    FORGOT PASSWORD
    Go Back
    RESET PASSWORD
    Go Back
    Continue with LinkedIn
    OR
    Fill Up a Simple Form
    Already a Member? Login
    SIGN UP
    Fill all the below details correctly and click on Next
    Go Back
    Distinguish between getchar and scanf functions for reading strings? - EngineersHub
    Go Back
    Question
    Marla Upender
    3 years ago
    1 Answer(s) posted Write an answer 10142
    Answer
    Read Mode
    Answer posted by Anandam Lokesh
    3 years ago

    In some situations, the scanf() function has one glaring weakness you need to fit the enter key before the function can be accepted what we have a type.

    This is overcome by the getch( ) function, which will read a single character the instant it is typed without waiting for enter key to be typed followed character.

    That you typed the getchar() is a macro and whereas the scanf( ) is a function.

    The getchar( ) takes a single character at a time whereas scanf( ) can accept any number of inputs from the keyboard.

    Scanf( ) accepts different type of data types whereas getchar( ) accepts only the character constants or digits or characters.

    194
    X
    Distinguish between getchar and scanf functions for reading strings?
    X
    Distinguish between getchar and scanf functions for reading strings?

    In some situations, the scanf() function has one glaring weakness you need to fit the enter key before the function can be accepted what we have a type.

    This is overcome by the getch( ) function, which will read a single character the instant it is typed without waiting for enter key to be typed followed character.

    That you typed the getchar() is a macro and whereas the scanf( ) is a function.

    The getchar( ) takes a single character at a time whereas scanf( ) can accept any number of inputs from the keyboard.

    Scanf( ) accepts different type of data types whereas getchar( ) accepts only the character constants or digits or characters.

    EngineersHub Logo
    x
    Loading...