.
  Vyom World.com . Let's Touch the Sky Together!  
.

Home
VyomWorld.com Home
Interview Questions
VyomLinks.com Home
JobsAssist.com Home
Vyom Network
Contact Us
Jobs & Careers
Resume Submitter
Placement Papers
IT Companies Directory
Computer Jobs
Interview Questions
Online Exams
Vyom Career eMag.
Fun
Send FREE SMS!
SMS Jokes
Source Codes Library
Source Codes Home
ASP Source Codes
C Source Codes
C++ Source Codes
COBOL Source Codes
Java Source Codes
Pascal Source Codes
Submit Source Codes
GATE
GATE an Overview
GATE Preparation
Study Materal
GRE
GRE an Overview
GRE Questions
GRE Preparation
GRE Universities
TOEFL Preparation
TOEFL Resources
GMAT Preparation
GMAT Resources
MBA Preparation
MBA Resources
Networking Concepts
Networking Concepts
Testing Preparation
Testing Resources
Webmasters
Free Traffic Builder
Webmaster Articles
Web Hosting
Tutorials
Hardware Tutorial
1500 Free eBooks New!


Home » Placement Papers » TATA ELXSI Placement Papers » TATA ELXSI Previous Year Placement Paper

 

TATA ELXSI Placement Paper -: .Net Questions With Answers


Advertisements
Advertisements




TATA ELXSI Previous Years Solved Sample Placement Papers

  1. What will be the output of the following C# code?

    using System;
    
    namespace MyApplication {
      class Program {
        static void Main(string[] args) {
          string[] mobiles = {"iPhone", "Samsung", "Vivo"};
          Console.WriteLine(mobiles[0] + mobiles[2]);
        }
      }
    }
        

    A: iPhoneVivo

    B: iPhone+Vivo

    C: Exception

    D: iPhone Vivo

    Ans: A

    Explanation:

    The statement mobiles[0] + mobiles[2] concatenates the 0th and 2nd elements, resulting in "iPhoneVivo".

  2. Which array method is used to sort an array alphabetically or in ascending order in C#?

    A: sort()

    B: sorting()

    C: Sort()

    D: Sorting()

    Ans: C

    Explanation:

    The Sort() method is used to sort an array alphabetically or in ascending order in C#.

  3. What will be the output of the following C# code?

    using System;
    
    namespace MyApplication {
      class Program {
        static void Main(string[] args) {
          int[,] ARR = {{1,2},{3,4}};
          Console.WriteLine(ARR.GetLength(0) + "," + ARR.GetLength(1));
        }
      }
    }
        

    A: 4,4

    B: 2,2

    C: Compilation Error

    D: Runtime Error

    Ans: B

    Explanation:

    The code prints the dimensions of the 2D array. The first dimension (rows) and the second dimension (columns) both have lengths of 2, so the output is 2,2.

  4. Which is the correct syntax to declare an array with 2 rows and 3 columns in C#?

    A: int arr[2][3] = new int[2][3];

    B: int arr[2,3] = new int[2,3];

    C: int[,] arr = new int[2,3];

    D: int [,]arr = new [2,3]int;

    Ans: C

    Explanation:

    The correct way to declare an array with 2 rows and 3 columns in C# is:

    int[,] arr = new int[2,3];
  5. To declare an array, define the variable type with ___.

    A: Square brackets []

    B: Curly brackets {}

    C: Round brackets ()

    D: None of the above

    Ans: A

    Explanation:

    To declare an array, define the variable type with square brackets [].

  6. Which C# keyword is used to coming out from the loop?

    A: break

    B: continue

    C: Both A and B

    D: None of the above

    Ans: A

    Explanation:

    The C# break keyword breaks the execution of the loop and sends the program’s control to the next statement written after the loop.

  7. Which is the correct method to convert given string in uppercase?

    A: Upper()

    B: ToUpper()

    C: Upr()

    D: ToUpr()

    Ans: B

    Explanation:

    The ToUpper() method is used to convert the given string into the uppercase.

    using System;
    
    class Program {
      public static void Main() {
        string str = "includehelp";
        Console.WriteLine(str.ToUpper());
      }
    }
        
  8. What is String.Length in C#?

    A: Property

    B: Method

    C: Constructor

    D: Both A and B

    Ans: A

    Explanation:

    The String.Length is a property of System.String class that is used to get the number of characters in the current String object.

  9. What will be the output of the following C# code?

    using System;
    
    class Program {
      static void Main(string[] args) {
        String s1 = "Hello";
        String s2 = "IncludeHelp";
        String s3 = s1;
        Console.WriteLine(s1.Equals(s3) + "  " + s2.CompareTo(s1));
      }
    }
        

    A: Error

    B: True True

    C: True False

    D: True 1

    Ans: D

    Explanation:

    The Equals() method returns a bool value. We assigned s1 to s3. Thus, the statement s1.Equals(s3) will return "True". The CompareTo() method returns an int value, and s2.CompareTo(s1) will return 1 because this instance (s2) follows s1.

  10. What will be the output of the following C# code?

    using System;
    
    class Program {
      static void Main(string[] args) {
        String str = "Hello";
        Console.WriteLine(str.Length);
      }
    }
        

    A: 5

    B: 6

    C: 7

    D: 4

    Ans: A

    Explanation:

    The String.Length returns the length of the string. Thus, the output will be 5.




 


.

Recently Updated: New Placement Papers added.
Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Programming & Source Codes | GRE Preparation | Jobs, Discussions | Software Listing | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | International Business Information | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | FAQs | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Excellent Mobiles | Software Testing | Interview Questions | Freshers Jobs | Server Insiders | File Extension Directory

Copyright ©2003-2025 Vyom Technosoft Pvt. Ltd., All Rights Reserved. Read our Privacy Policy