Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
C Programs C-String cpp-string

Strings in C

Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character ‘&#x...
Articles C C Array and String

C function to Swap strings

Let us consider the below program. #include<stdio.h> void swap(char *str1, char *str2) {   char *temp = str1;   str1 = str2; ...
Articles C C Array and String

Storage for Strings in C

In C, a string can be referred to either using a character pointer or as a character array. Strings as character arrays char str[4] = "GfG"; /*One...
C C++ C Array and String

How to write long strings in Multi-lines C/C++?

Image a situation where we want to use or print a long long string in C or C++, how to do do this? In C/C++, we can break a string at any point in the middle using tw...
Arrays C++ School Programming

Array of Strings in C++ (3 Different Ways to Create)

Array of Strings can be created in C++, which can be quite handy. There are 3 ways to create Array of Strings. Using 2D array (Both C and C++): This method is usef...
C++ Strings cpp-string

stringstream in C++ and its applications

A stringstream associates a string object with a stream allowing you to read from the string as if it were a stream (like cin). Basic methods are – cle...
Dynamic Programming Strings Google

Find if a string is interleaved of two other strings DP-33

Given three strings A, B and C. Write a function that checks whether C is an interleaving of A and B. C is said to be interleaving A and B, if it contains all charac...
C# CSharp-Arrays CSharp-string

C# Arrays of Strings

An array is a collection of the same type variable. Whereas a string is a sequence of Unicode characters or array of characters. Therefore arrays of strings is an arr...
C# CSharp-ControlFlow CSharp-string

C# How to use strings in switch statement

The switch statement is a multiway branch statement. It provides an easy way to forward execution to different parts of code based on the value of the expression. Str...
Java School Programming Java-String-Programs

How to Initialize and Compare Strings in Java?

Initializing Strings in Java 1. Direct Initialization(String Constant) : In this method, a String constant object will be created in String pooled area which is insid...

Subscribe to Our Newsletter