It will work because after returning, the line "printf("%d\n", head->data);" will be executed, which will print 3.

JeffB