fork(1) download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5.  
  6. struct foo {
  7. char str[3];
  8. };
  9.  
  10.  
  11.  
  12. int main() {
  13. foo s1 = {'a', 'b', 'c'};
  14. foo s2 = s1;
  15. printf("%.*s\n", 3, s2.str);
  16. return 0;
  17. }
Success #stdin #stdout 0s 5504KB
stdin
Standard input is empty
stdout
abc