fork download
  1. #include <iostream>
  2. #include <cstdlib>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. int n=10;
  8. char *cs = (char*) calloc(n+1, sizeof(char));
  9. for (int i=0; i<n; i++) {
  10. cs[i] = '*';
  11. }
  12. cout << cs << endl;
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 2812KB
stdin
Standard input is empty
stdout
**********