SW006013 Microchip Technology, SW006013 Datasheet - Page 134

MPLAB C Compiler For DsPIC DSCs

SW006013

Manufacturer Part Number
SW006013
Description
MPLAB C Compiler For DsPIC DSCs
Manufacturer
Microchip Technology
Series
DsPIC30F/33Fr
Type
MPLAB® C Compilerr
Datasheet

Specifications of SW006013

Supported Families
DsPIC30F, DsPIC33F
Core Architecture
DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
DsPIC30F And DsPIC33F
Tool Function
Compiler
Tool Type
Compiler
Processor Series
dsPIC
Lead Free Status / RoHS Status
na
For Use With/related Products
dSPIC DSCs
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 SW006013