#include <stdio.h> int main(void) { float data[6] = { 10.1, 20.2, 30.3, 40.4, 50.5 }; float *p; // (1) p = data; while(*p) { printf("%f\n", *p); p++; } // (2) p = data; while(*p) { printf("address of %f: %p\n", *p, p); p++; } return 0;}
Standard input is empty
10.100000 20.200001 30.299999 40.400002 50.500000 address of 10.100000: 0xbf8eff48 address of 20.200001: 0xbf8eff4c address of 30.299999: 0xbf8eff50 address of 40.400002: 0xbf8eff54 address of 50.500000: 0xbf8eff58
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!