SW006014 Microchip Technology, SW006014 Datasheet - Page 134

C COMPILER MPLAB FOR PIC24 MCU

SW006014

Manufacturer Part Number
SW006014
Description
C COMPILER MPLAB FOR PIC24 MCU
Manufacturer
Microchip Technology
Type
MPLAB® C Compilerr
Series
PIC24r
Datasheet

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
DS51456E-page 130
strncpy (Continued)
}
Output:
buf1 : We're here
buf2 : Where is the time?
buf3 : Why?
buf4 : Where?
buf1 after strncpy of 6 characters of buf2:
buf1 after strncpy of 18 characters of buf2:
buf1 after strncpy of 5 characters of buf3:
buf1 after strncpy of 9 characters of buf4:
strncpy(buf1, buf2, 6);
printf("buf1 after strncpy of 6 characters "
printf("\t( %d characters)\n", strlen(buf1));
printf("\n");
strncpy(buf1, buf2, 18);
printf("buf1 after strncpy of 18 characters "
printf("\t( %d characters)\n", strlen(buf1));
printf("\n");
strncpy(buf1, buf3, 5);
printf("buf1 after strncpy of 5 characters "
printf("\t( %d characters)\n", strlen(buf1));
printf("\n");
strncpy(buf1, buf4, 9);
printf("buf1 after strncpy of 9 characters "
printf("\t( %d characters)\n", strlen(buf1));
Where here
( 10 characters)
Where is the time?
( 18 characters)
Why?
( 4 characters)
Where?
( 6 characters)
"of buf2: \n\t%s\n", buf1);
"of buf2: \n\t%s\n", buf1);
"of buf3: \n\t%s\n", buf1);
"of buf4: \n\t%s\n", buf1);
© 2008 Microchip Technology Inc.

Related parts for SW006014