A PHP Error was encountered

Severity: 8192

Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Filename: libraries/Filtered_db.php

Line Number: 23

Write a program in C# Sharp to separate the individual characters from a string
Q:

Write a program in C# Sharp to separate the individual characters from a string

0

Write a program in C# Sharp to separate the individual characters from a string.

Test Data :
Input the string : nerdutella.com
Expected Output :

The characters of the string are : 
d a a f o o r  .  c  o  m 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

using System;  
public class Exercise3
{  
    public static void Main() 
        {
            string str; 
            int l=0;	
      Console.Write("\n\nSeparate the individual characters from a string :\n");
      Console.Write("------------------------------------------------------\n"); 	
      Console.Write("Input the string : ");
      str = Console.ReadLine();
	  Console.Write("The characters of the string are  :  ");
            while (l <= str.Length - 1)
            {
                Console.Write("{0} ", str[l]);
                l++;
            }
                Console.Write("\n\n");
        }
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now