Skip to content

tashwitab/strings-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

TITLE: Strings in C++

AIM: To write a program in C++ using strings

THEORY: In C++, strings are sequences of characters used to represent text. They are implemented as a part of the Standard Template Library (STL) and provide various useful operations for manipulating text data. C++ strings are more versatile than traditional character arrays, as they automatically manage memory allocation and resizing. You can perform operations like concatenation, comparison, and substring extraction directly on strings, making them convenient for tasks involving text processing and manipulation.

ALGORITHM:

       1. Start
       2. Include the necessary header files for the input and output stream.
       3. Declare the main function.
       4. Declare a character array named str and initialize it with the string "TASHWITA".
       5. Declare another character array named str1 and initialize it with the individual characters 'T', 'A', 'S', 'H', 'W', 'I', 'T', 'A'.
       6. Print the content of the array str using cout.
       7. Return 0 to indicate successful execution.
       8. End

CONCLUSION: The strings are implemented in the program and then initialized in the program. The program is executed successfully.

About

Program about strings in C++

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages