This works some of the time, but is not portable or reliable. For example, this works for me on MacOS:
julia> ccall(:printf, Cint, (Cstring,), "Hello world!\n")
Hello world!
13
julia> ccall(:printf, Cint, (Cstring, Cdouble), "A number %g.\n", 3.14159)
A number 3.14159.
18
but on Windows I get:
julia> ccall(:printf, Cint, (Cstring,), "Hello world!\n")
Hello world!
13
julia> ccall(:printf, Cint, (Cstring, Cdouble), "A number %g.\n", 3.14159)
A number 0.
12