Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / mahesh.b.p.c

static void Main(string[] args)
{
string value= Console.ReadLine();
foreach(object num in value)
{
Console.WriteLine(num);
Console.WriteLine();
}
Console.Read();

}

Is This Answer Correct ?    11 Yes 4 No

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

Answer / 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

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

Answer / chandan

public static void Main()
        {
            string str = Console.ReadLine();
            foreach (var obj in str)
            {
                Console.Write(obj.ToString());
                Console.WriteLine();
            }
            Console.ReadLine();
        }

Is This Answer Correct ?    1 Yes 0 No

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

Answer / 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

More OOPS Interview Questions

What is byval and byref? What are differences between them?

0 Answers   HCL, Wipro,


What is command routing in MFC

1 Answers   GE,


what is difference between objects and function

3 Answers  


what are three tenets of object orinted Systems?Why they call like that ? Please answer me. Advance thanks.

2 Answers   Excel,


Write a program to sort the number with different sorts in one program ??

0 Answers   NIIT,


What does it mean when someone says I oop?

0 Answers  


What polymorphism means?

0 Answers  


what is the difference between function template and template of function?explain with example.

2 Answers  


Will I be able to get a picture in D drive to the c++ program? If so, help me out?

0 Answers  


What are oops functions?

0 Answers  


write knight tour problem which is present in datastructure

0 Answers  


what is oops

4 Answers   DELL,


Categories