Tech Study

Write a C# program to Separate the individual characters from a string

Introduction

I have used Visual Studio 2012 for debugging purpose. But you can use any version of visul studio as per your availability..

using System;
public class StringExercise
{
    public static void Main()
    {
        string str;
        int length = 0;
 
        Console.Write("Input the string : ");
        str = Console.ReadLine();
        Console.Write("The characters of the string are  :  ");
        while (length <= str.Length - 1)
        {
            Console.Write("{0} ", str[length]);
            length++;
        }
        Console.ReadLine();
    }
}

Result

Write a C# program to Separate the individual characters from a string
Write a C# program to Separate the individual characters from a string

TaggedWrite a C# program to Separate the individual characters from a string

Python Examples

Introduction: Python Examples are the basic programming concepts of python like python syntax,python data types,,python operators,python if else,python comments etc.. …

Read more

C String Functions

C String Functions perform certain operations, It provides many useful string functions which can come into action. The <string.h> header …

Read more