TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
anndy smaals
NA
24
4.3k
splitting a string into an array of strings
Dec 17 2018 5:45 PM
split the string into an array of strings, stored in the words string array,
and then find out which word is the longest, and copy that to the longestWord variable
using System;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
string lyric = "We've come a long long way together";
string[] words;
string longestWord;
words = lyric.Split(' ');
longestWord = lyric;
Console.WriteLine("There are " + words.Length + " words, and the longest is " + longestWord);
}
}
}
Reply
Answers (
1
)
( inclusive) output something if its within a range
what is the problems or disadvantages of using interface cla