.
  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 is the use of 'throw' statement in C#?

    A: to return from the calling functions to called function

    B: to throw an exception manually during the execution of the program

    C: to return from the switch statement

    D: None of the above

    Ans: B

    Explanation:

    The C# throw statement is used to throw an exception manually during the execution of the program.

  2. 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.IndexOf('h'));
      }
    }
        

    A: 0

    B: 1

    C: -1

    D: Error

    Ans: C

    Explanation:

    The IndexOf() method returns the index of a given character, and it returns -1 if the given character is not found in the string. Here, we are trying to get the index of 'h' which is not present in the string. Thus, the output will be -1.

  3. 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 [].

  4. 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);
        }
      }
    }
        

    A: "iPhone", "Samsung", "Vivo"

    B: {"iPhone", "Samsung", "Vivo"}

    C: string[]

    D: System.String[]

    Ans: D

    Explanation:

    In the above code, the statement Console.WriteLine(mobiles); will print the type of the variable that is System.String[].

  5. 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[-1]);
        }
      }
    }
        

    A: None

    B: Warning

    C: Exception

    D: System.String[]

    Ans: C

    Explanation:

    The array index starts from 0 in C#. In the above code, we are trying to access an element with index -1, resulting in an exception: System.IndexOutOfRangeException.

  6. Which statement is correct about the following C# statement?

    int[] x = {10, 20, 30};

    A: 'x' is a reference to the array created on stack

    B: 'x' is a reference to an object created on stack

    C: 'x' is a reference to an object of a 'System.Array' class

    D: None of the above

    Ans: C

    Explanation:

    In the above given C# statement, the variable x is a reference to an object of a System.Array class.

  7. Which array property is used to get the total number of elements in C#?

    A: Len

    B: Length

    C: Elements

    D: MaxLen

    Ans: B

    Explanation:

    The Length property is used to get the total number of elements in C#.

  8. Which operator is used to access variables/fields inside a class in C#?

    A: Arrow Operator (->)

    B: Dot Operator (.)

    C: Greater Than (>)

    D: Dot and Greater Than (.>)

    Ans: B

    Explanation:

    The dot (.) operator is used to access variables/fields in a class in C#.

    Syntax:
    Class_Name.Variable_Name/Field_Name;
        
  9. Is overriding of a function possible in the same class in C#?

    A: Yes

    B: No

    Ans: B

    Explanation:

    No, overriding of a function is not possible in the same class in C#. The override modifier is required to extend or modify the implementation of an inherited method.

  10. Which is not a type of constructor in C#?

    A: Static Constructor

    B: Private Constructor

    C: Body Constructor

    D: Parameterized Constructor

    Ans: C

    Explanation:

    There are 5 types of constructors in C#: Static, Private, Copy, Default, and Parameterized constructors.

  11. How many types of access modifiers in C#?

    A: 2

    B: 3

    C: 4

    D: 5

    Ans: C

    Explanation:

    In C#, there are 4 types of access modifiers: public, private, protected, and internal.

  12. What does the access modifier do in C#?

    A: To maintain the syntax

    B: To define a variable inside the class

    C: To access the variables defined inside the class

    D: To control the visibility of class members

    Ans: D

    Explanation:

    Access modifiers control the visibility of class members, providing a security level for each individual class and member.

  13. The internal access modifier is used for ___.

    A: Types and type members

    B: Defining a field that can be accessed in all classes

    C: Defining a field that can be accessed in inherited classes

    D: All of the above

    Ans: A

    Explanation:

    The internal access modifier is used for types and type members. They are accessible only within files in the same assembly.




 


.

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