Top "Printf" questions

`printf` is a common function for formatted output.

C++, regarding fprintf and ofstream

I've been using fprintf for a while now and I'd like to ask a question. What is the equivalent of …

c++ ofstream printf
Why does gcc -Wall give warning about zero-length format string?

I searched around a little bit for information on this but didn't find anything satisfactory. Is there some special behavior …

c gcc string-formatting printf gcc-warning
Stm32 printf float variable

I want to log out from stm32f405 via usart. In my syscall.c file i realize function to print …

printf stm32
How does Haskell printf work?

Haskell's type safety is second to none only to dependently-typed languages. But there is some deep magic going on with …

haskell printf variadic-functions polyvariadic
Is sprintf(buffer, "%s […]", buffer, […]) safe?

I saw use of this pattern to concatenate onto a string in some code I was working on: sprintf(buffer, "%…

c printf c-strings
OCaml Printf.sprintf

Why does this behavior occur? # Printf.sprintf ("Foo %d %s") 2 "bar";; - : string = "Foo 2 bar" # Printf.sprintf ("Foo %d" ^ " %s") 2 "…

ocaml printf type-systems
%ld format conversion for portability

I have a code base which is intended to compile without warnings and run without any glitches on multiple architectures, …

c++ x86 printf 32bit-64bit 16-bit
Cout not printing number

Issue I'm getting no output from a simple cout, whereas a printf will always print the number: std::cout <&…

c++ pointers printf cout
printf more than 5 times faster than std::cout?

#include <iostream> #include <cstdlib> #include <cstdio> #include <ctime> int main(int argc, …

c++ performance printf cout
How does printf work internally?

I am curious as to how printf works internally within Linux. I don't understand how it writes data to STDOUT. …

c assembly printf standard-library