O'Reilly logo

C Primer Plus, Fourth Edition by Stephen Prata

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Character Strings and String Functions

You will learn about the following in this chapter:

  • Functions:

    gets(), puts(), strcat(), strncat(), strcmp(), strncmp()

    strcpy(), strncpy(), sprintf(), strchr()

  • Creating and using strings

  • Using several string and character functions from the C library and creating your own string functions

  • Using command-line arguments

Character strings are one of the most useful and important data types in C. You have been using character strings all along, but there still is much to learn about them. Of course, you already know the most basic fact: A character string is a char array terminated with a null character (\0). Therefore, what you've learned about arrays and pointers carries over to character strings. But ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required