Featured Post

Variable Sized Arrays Discussions | C++ | HackerRank Variable Length Arrays in C and C++ - GeeksforGeeks

Variable Sized Arrays Variable Sized Arrays Discussions | C++ | HackerRank Consider an  -element array,  , where each index   in the array c...

Sunday, March 21, 2021

"Hello World!" in C Discussions | C | HackerRank Solution by Sintu Kumar suman

 "Hello World!" in C  



This is a hacker rank Problem the only question has been copied from hacker rank 
Answer is given by me.

"Hello World!" in C Objective In this challenge,
 we will learn some basic concepts of C that will get you started with the language. 

You will need to use the same syntax to read input and write output in many C challenges. 

Task This challenge requires you to print 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. Input Format You do not need to read any input in this challenge. 

Output Format Print on the first line, and the string from the given input on the second line.


 
Sample Input 0 

Welcome to C programming. 



Sample Output 0 

Hello, World! 
Welcome to C programming.












#include <stdio.h>
#include <string.h>

int main() 
{
 
    char s[100];
    scanf("%[^\n]%*c", &s);
    printf("Hello, World!\n");
    printf(s);
 
    return 0;
}






Follow me on Linkedin



https://www.linkedin.com/in/sintu-kumar-suman-2a49b817b/

Sintu Kumar Suman
Software Developer









No comments:

Post a Comment