fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. float arr[5] = {12.5, 10.0, 13.5, 90.5, 0.5}; float *ptr1 = &arr[0]; float *ptr2 = ptr1 + 3; cout<<*ptr2<<" "; cout<< ptr2 - ptr1;
  7. return 0;
  8. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
90.5 3