SW006014 Microchip Technology, SW006014 Datasheet - Page 72
SW006014
Manufacturer Part Number
SW006014
Description
C COMPILER MPLAB FOR PIC24 MCU
Manufacturer
Microchip Technology
Type
MPLAB® C Compilerr
Series
PIC24r
Datasheet
1.SW006014.pdf
(246 pages)
Specifications of SW006014
Supported Families
PIC24
Core Architecture
PIC
Kit Contents
Software And Docs
Mcu Supported Families
PIC24
Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC24
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
- Current page: 72 of 246
- Download datasheet (3Mb)
DS51456E-page 68
fwrite
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
Example:
Writes data to the stream.
<stdio.h>
size_t fwrite(const void *ptr, size_t size,
ptr
size
nelem
stream
Returns the number of complete elements successfully written, which
will be less than nelem only if a write error is encountered.
The function writes characters to a given stream from a buffer pointed
to by ptr up to nelem elements whose size is specified by size. The
file position indicator is advanced by the number of characters success-
fully written. If the function sets the error indicator, the file-position indi-
cator is indeterminate.
#include <stdio.h> /* for fread, fwrite,
int main(void)
{
size_t nelem, FILE *stream);
FILE *buf;
int x, numwrote, numread;
double nums[10], readnums[10];
if ((buf = fopen("afile.out", "w+")) != NULL)
{
}
else
for (x = 0; x < 10; x++)
{
}
numwrote = fwrite(nums, sizeof(double),
printf("Wrote %d numbers\n\n", numwrote);
fclose(buf);
printf("Cannot open afile.out\n");
nums[x] = 10.0/(x + 1);
printf("10.0/%d = %f\n", x+1, nums[x]);
pointer to the storage buffer
size of item
maximum number of items to be read
pointer to the open stream
/* printf, fopen, fclose, */
/* sizeof, FILE, NULL
10, buf);
© 2008 Microchip Technology Inc.
*/
*/
Related parts for SW006014
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet: