eHow launches Android app: Get the best of eHow on the go.

How to Use the Strcpy Function in C

Video Preview

Summary: The strcpy function in C refers to copying a collection of characters referred to as a string. Use the strcpy function in C++ with tips from a software developer in this free video on computer training.

Views:
431
Presenter
By Dave Andrews
eHow Presenter

Dave Andrews is a software developer with a business and Web site selling programs and other computer services in Franklin, Tenn. Having worked in the IT industry for more than 8...read more

Post a Comment

Post a Comment

Video Transcript

"Hi, my name is Dave Andrews, today I'm going to show you how to use the STRCPY function in C . If you read the STRCPY function, what it is saying is string copy. A string in C is a collection of characters that make up a sentence, a phrase, or a word. Let's take a look at my program. The very first thing I do is include the input/output stream subsystem for C . And then the main function which is the very first function that's run in any C program, I create two variables. The first one is text, and it's a collection of char characters, and I'm assigning it the value this is my string. The next one is a ray of char characters, text two, that can hold up to two hundred characters. Immediately beneath that, I run the STRCPY function. The first value that I gave to it, or first variable, is the destination string that it's going to be copied to, and the second one is the source string. So what I'm saying to do is copy the value of text into text two. I then print text two to the screen using the C alt object. So if will compile and run the program, I should get the output "this is my string" to the screen. Let's run the results. And I get the value "this is my string." It's that easy to use this function. My name is Dave Andrews, and I've just showed you how to use the STRCPY function in C ."

eHow Article: How to Use the Strcpy Function in C

Related Ads

  • Have you done this? Click here to let us know.
Computers
Alexia Petrakos,

Meet Alexia Petrakos eHow's Computers Expert.

Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

eHow Computers
eHow_eHow Technology and Electronics