fork(3) download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. float arr[5] = {1.0, 2.0, 3.5, 3.45, 7.95};
  6. float *ptr1 = arr;
  7. for (int i = 0; i < 5; ++i, ++ptr1)
  8. {
  9. std::cout << *ptr1 << std::endl;
  10. }
  11. }
Success #stdin #stdout 0.01s 5396KB
stdin
Standard input is empty
stdout
1
2
3.5
3.45
7.95