Input:
enter the value:1234
output:
1
2
3
4
write a program to get above output.....

Answer Posted / bala

static void Main(string[] args)
{
string value = Console.ReadLine();
foreach (var num in value)
{
Console.Write(num + " ");
}
Console.Read();

}

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is destructor oops?

869


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2242


What is encapsulation process?

804


Is oop better than procedural?

792


What is encapsulation in oops?

782


What are classes oop?

812


What are objects in oop?

855


What is the real life example of polymorphism?

874


What is cohesion in oop?

864


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1724


What are the advantages of polymorphism?

787


State what is encapsulation and friend function?

969


hi all..i want to know oops concepts clearly can any1 explain??

1907


when to use 'mutable' keyword and when to use 'const cast' in c++

1907


What is the difference between static polymorphism and dynamic polymorphism?

870