In this HackerRank Say "Hello, World!" With the C++ problem, we need to print the "Hello, World!" on the output screen using the printf function.


HackerRank Say "Hello, World!" With C++ problem solution


HackerRank Say "Hello, World!" With C++ problem solution

 #include <iostream>
using namespace std;

int main() {
    string greeting = "Hello, World!";
    cout << greeting << endl;
    
    return 0;
}
#include <iostream>
using namespace std;

int main() {
    printf("Hello, World!");
    
    return 0;
}