C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !



Posted By: Rohit       Member Level: Gold       Posted Date: 23 May 2007       Category: C#

What will be the output of following program?



What will be the output of following program?
private static void test()
{
try
{
string[] str = { "0", "1", "2", "3" };
if (str[1] == "2")
{
Console.WriteLine("Success!!!");
}
else
{
Console.WriteLine("Failure!!!");
}
}
catch
{
Console.WriteLine("Error!!!");
}
finally
{
if(str != null)
{
str = null;
}
}
}


Select Answer:

Success!!!
Error!!!
Compilation Error
Failure!!!




      
Your Test Score: 0 / 0



Next Question: What is the maximum dimension of array technically possible in C#?
Previous Question: Collections
Related Questions:
  • How many levels are there in System.Diagnostics.TraceSwitcher?


  • The classes related to ADO.NET are encapsulated in the namespace


  • Is it possible to have different access modifiers on the get/set methods of a property?


  • Which .Gang of Four. design pattern is shown below?


  • What is a delegate?


  • Categories

    ASP.NET C# VB.NET 
    .NET Framework SQL Server Other 

    Submit Interview/Test Questions with Answers and make money from adsense revenue sharing program

    Want to prepare for an interview? Try our aptitude tests and standard interview questions first.


    dotNet Slackers   BizTalk Adaptors    Web Design


    Contact Us    Privacy Policy    Terms Of Use