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
What is encapsulation in simple terms?
How oops is better than procedural?
What are the features of oop?
What is encapsulation and abstraction? How are they implemented in C++?
Are polymorphisms mutations?
How do you define a class in oop?
What is static in oop?
What is oops concept with example?
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?
What is encapsulation with example?
write a program to find 2 power of a 5digit number with out using big int and exponent ?
what type of question are asked in thoughtworks pair programming round ?
Why is oop useful?
What is difference between multiple inheritance and multilevel inheritance?
what is the sylabus for priliminaries?