Input:
enter the value:1234
output:
1
2
3
4
write a program to get above output.....
Answer Posted / arunbabu.k
static void Main(string[] args)
{
Console.WriteLine("Enter text/numbers");
string str1=Console.ReadLine();
char[] ch_str = new char[str1.Length];
ch_str = str1.ToCharArray();
for (int num = 0; num < str1.Length;num ++ )
{
Console.WriteLine(ch_str [num]);
}
Console.Read();
}
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Why is static class not inherited?
What is a class and object?
What is cohesion in oop?
Why is destructor used?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
What are oops functions?
What is stream in oop?
What is inheritance in oop?
What are the features of oop?
What does enum stand for?
What is overloading in oop?
Which is better struts or spring?
what are the ways in which a constructors can be called?
What is meant by multiple inheritance?
Can enum be null?