[ACCEPTED]-How to declare printf()?-printf

Accepted answer
Score: 18

The correct declaration (ISO/IEC 9899:1999) is:

int printf(const char * restrict format, ... );

But 1 it would be easiest and safest to just #include <stdio.h>.

Score: 12


man 3 printf

It will tell you printf signature:

int printf(const char *format, ...);

this is 1 the right one.

Score: 4

I have no idea why you'd want to do this.

But 1 it should be const char *.

Score: 0

Here is another version of the declaration:

extern int printf (__const char *__restrict __format, ...);


More Related questions