fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. float arr[5] = {12.5, 10.0, 13.5, 90.5, 0.5};
  5. float *ptr1 = &arr[0];
  6. float *ptr2 = ptr1 + 3;
  7. printf("%f ", *ptr2);
  8. printf("%d", ptr2 - ptr1);
  9. return 0;
  10. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
90.500000 3