Answers for "C++ program to print all the eprmutations of a string"

C++
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
1

print all chrchetrs of a string c++

#include <iostream>
#include <string>

int main() {
  std::string s = "Hello, World!";
  
  for (int i = 0; i < s.length(); i++) {
    std::cout << s[i] << std::endl;
  }
}
Posted by: Guest on July-05-2021

Code answers related to "C++ program to print all the eprmutations of a string"

Browse Popular Code Answers by Language