fork(2) download
  1. #include<iostream>
  2. #include<string.h>
  3. #include<stdio.h>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.  
  9. char a[100][20]={'\0'};
  10. int i=0;
  11.  
  12. do
  13. {
  14. cin>>a[i++];
  15. } while( getchar() != '\n' );
  16.  
  17. for(int j= 0 ; j < i ; j++)
  18. cout<< a[j] << " ";
  19. return 0;
  20. }
Success #stdin #stdout 0s 3100KB
stdin
Wow such a nice trick. +1 for Arun.
stdout
Wow such a nice trick. +1 for Arun.