HackerRank C- "Hello World!"

This challenge requires you to print "Hello World!" on a single line, and then print the already provided input string to stdout.

Note: You do not need to read any input in this challenge.

  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <math.h>
  4. #include <stdlib.h>
  5. int main()
  6. {
  7. char s[100];
  8. scanf("%[^\n]%*c", &s);
  9. printf("Hello, World!\n%s", s);
  10. /* Enter your code here. Read input from STDIN. Print output to STDOUT */
  11. return 0;
  12. }
Please click on the like button if it worked

Solution not working or have any suggestions? Please send an email to [email protected]

donate a cup of tea :)

Join Our Facebook Group

Share this solution


Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube