Use of XGDMatrixGetFloatInfo

Hi. I have the following code that creates an XGBoost classifier:

int main() {
DMatrixHandle train;
const char* train_path = "xtrain.libsvm";
bst_ulong num_rows;
const float* labels;
XGDMatrixCreateFromFile(train_path, 0, &train);
XGDMatrixNumRow(train, &num_rows);
XGDMatrixGetFloatInfo(train, "label", &num_rows, &labels);
printf("Labels:\n");
for (int i = 0; i < num_rows; ++i) {
	printf("%f", labels[i]);
}
printf("\n");
return 0;
}

The xtrain.libsvm is like this:

1.0 1:0.8 2:1.2 3:3.4
2.0 1:1.2 2:-3.4 3:2.1
0.0 1:1.0 2:2.3 3:-3.2
2.0 1:0.8 2:2.3 3:4.2

where the first column corresponds to the labels. The code compiles well but it does not print any number in the command prompt during the execution; does someone have an idea?