Bonjour a tous,
j'ai une petite question existentielle:
pourquoi la fonction puts est de type int, alors que celle ci ne retourne un entier non negatif?
pourquoi pas unsigned int?
NAME
puts - put a string on standard output
SYNOPSIS
#include <stdio.h>
int puts(const char *s);
DESCRIPTION
The puts() function writes the string pointed to by s, followed by a newline character, to the standard output stream stdout. The terminating null byte is not written.
RETURN VALUE
Upon successful completion, puts() returns a non-negative number. Otherwise it returns EOF, sets an error indicator for the stream and errno is set to indicate the error.
Partager