Top "Printf" questions

`printf` is a common function for formatted output.

How to print unsigned char[] as HEX in C++?

I would like to print the following hashed data. How should I do it? unsigned char hashedChars[32]; SHA256((const unsigned …

c++ hex printf unsigned-char
Mmh, who are you PRIu64?

I am new to C and I am confronted with: #include <stdio.h> #include <inttypes.h> …

c macros printf
Set variable text column width in printf

In order to determine the size of the column in C language we use %<number>d. For instance, …

c size printf
How to use strtok()

I'm writing a C program to study the usage of function strtok(). Here is my code: #include <stdio.h&…

c printf token strtok
Why #include <stdio.h> is not required to use printf()?

Session transcript: >type lookma.c int main() { printf("%s", "no stdio.h"); } >cl lookma.c Microsoft (R) 32-bit …

c include printf declaration
How to use printf with NSString

I need to use something like NSLog but without the timestamp and newline character, so I'm using printf. How can …

objective-c cocoa-touch nsstring printf nslog
how to write an integer to a file (the difference between fprintf and fwrite)

I've been trying to write an integer to a file (open mode is w). fprintf wrote it correctly but fwrite …

c fwrite printf
Converting a void* to a std::string

After perusing the web and messing around myself, I can't seem to convert a void*'s target (which is a …

c++ string printf void-pointers
Why is printf not using scientific notation?

I understand that this is a common problem. However I can't find a solid straight answer. 16 ^ 54 = 1.0531229167e+65 (this is the …

c printf pow
C/C++ printf() before scanf() issue

I'm using Eclipse to code in C/C++ and I'm struggling with what might be something pretty easy. In my …

c printf output scanf