delorie.com/djgpp/doc/libc/libc_633.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

putw

Syntax

 
#include <stdio.h>

int putw(int x, FILE *file);

Description

Writes a single 32-bit binary word x in native format to file. This function is provided for compatibility with other 32-bit environments, so it writes a 32-bit int, not a 16-bit short, like some 16-bit DOS compilers do.

Return Value

The value written, or EOF for end-of-file or error. Since EOF is a valid integer, you should use feof or ferror to detect this situation.

Portability

ANSI/ISO C No
POSIX No

Example

 
putw(12, stdout);


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004