#include<stdio.h>
#include<string.h>
int main()
{
char x[]="HOW TO USE THIS";
char y[25];
char z[15];
strcpy(y,x);
puts(y);
strncpy(z,x,6);
puts(z);
}
Have a Read!
Hi Everyone.
The idea for this page is to provide new c users simple c tutorials to learn how to develop the logic and more importantly correct way to write syntax.
ENJOY !!!
Sunday, February 6, 2011
How to use strcpy & strncpy
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment