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
State what is encapsulation and friend function?
Why do we use oops?
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
Can a varargs method be overloaded?
What are the 4 pillars of oop?
Who invented oop?
can we make game by using c
How to hide the base class functionality in Inheritance?
Why is static class not inherited?
What is the point of polymorphism?
What is pointer in oop?
What is debug class?what is trace class? What differences are between them? With examples.
What is the real life example of polymorphism?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
How do you answer polymorphism?