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
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
What is class and object with example?
what are the realtime excercises in C++?
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?
Can bst contain duplicates?
What is methods in oop?
How is class defined?
What is the main feature of oop?
Can we override main method?
Is data hiding and abstraction same?
What is class and object in oops?
What is the purpose of polymorphism?
i got a backdoor offer in process global,Bangalore..Can i work with it?
How long to learn object oriented programming?
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?