ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
   
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  OOPS
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
Input:
enter the value:1234
output:
1
2
3
4
write a program to get above output.....
 Question Submitted By :: Vinothmca21
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Input: enter the value:1234 output: 1 2 3 4 write a program to get above output.....
Answer
# 1
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 ?    6 Yes 2 No
Mahesh.b.p.c
 
  Re: Input: enter the value:1234 output: 1 2 3 4 write a program to get above output.....
Answer
# 2
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 ?    1 Yes 0 No
Arunbabu.k
 
 
 

 
 
 
Other OOPS Interview Questions
 
  Question Asked @ Answers
 
What are the different forms of polymorphism?? PCS8
how does a main() in C++ is different from main() in C?  5
WHAT'S THE OOPS BASIC OOPS CONCEPTS IN DOTNET  1
why c++ is called OOPS? waht is inherutance? what is compiler?  5
what is the difference between function template and template of function?explain with example.  2
What do you mean by inline function?  6
Name an advantage of array over linked list? IBM24
Write a program to accept a number and to print numbers in pyramid format? for eg:for a no. 5 1 212 32123 4321234 543212345  4
What are the advantages of inheritance?  25
what is pointers Exilant7
Which is faster post increment or pre increment ? and in which cases should u use either - to increase speed? EA-Electronic-Arts3
Example for 4 pillar of oops like, Inheritance,Poly,Abstraction,Encabsulation ?  3
 
For more OOPS Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com