Answers for "print string in c++"

C++
11

how to print in c++

#include <iostream>

int main() {
  std::cout << "Hello, World!"; // prints 'Hello, World!' to the output.
  return 0;
}
Posted by: Guest on May-02-2020
3

how to print in c++

#include <iostream>
using namespace std;

int main(){
  cout<<"Hello World!"<< endl; // prints "Hello World"
  return 0;
}
Posted by: Guest on July-06-2020
3

c++ print string

std::cout << "";
Posted by: Guest on November-28-2020
1

print in c++

#include <iostream>
using namespace std;

int main() {
  cout << "me";
  return 0;
}
Posted by: Guest on August-17-2021
1

print in c++

#include <iostream>
using namespace std;

int main() {
  cout << "ENTER TEXT HERE";
  return 0;
}
Posted by: Guest on March-01-2021
0

print string in c++

#include <iostream>
#include <string>
#include <iterator>

using std::cout; using std::cin;
using std::endl; using std::string;

int main(){
    string s1 = "This string will be printed";
    cout << s1;
    cout << endl;

    printf("%s", s1.c_str());
    cout << endl;

    return EXIT_SUCCESS;
}
Posted by: Guest on July-23-2021

Browse Popular Code Answers by Language