We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. Prepare
  2. C
  3. Introduction
  4. "Hello World!" in C
  5. Discussions

"Hello World!" in C

Problem
Submissions
Leaderboard
Discussions
Editorial

    You are viewing a single comment's thread. Return to all comments →

  • shreyamishra1601
    3 years ago+ 1 comment

    scanf("%[^\n]%*c", &s);

    [^\n]-prints whole string for example in "hello guys" only hello will be printed but after [^\n] whole string will be printed considering space.

    5|
    Permalink
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature