.
  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 » TVS Placement Papers » TVS Previous Year Placement Paper

 

TVS Placement Paper -: Programming Questions And Answers


Advertisements
Advertisements




TVS Previous Years Solved Sample Placement Papers

  1. Select the query which allows you to select rownum and employee name (empname) from a record(emp)?

    A: select rownum, enum from emp;

    B: select colnum, ename from emp;

    C: select colname, enum from emp;

    D: select rownum, ename from emp;

    Ans: D
  2. What does a one-to-one relationship indicate?

    A: More entities are needed.

    B: The model should be denormalized.

    C: The tables are not properly indexed.

    D: The model cannot be implemented physically.

    Ans: B
  3. What clause do you use in the query to help avoid a table scan?

    A: GROUP BY clause

    B: HAVING clause

    C: FROM clause

    D: WHERE clause

    Ans: D
  4. What will be the output of the following C# code?

    using System;
    
    namespace MyApplication {
      class Program {
        static void Main(string[] args) {
          bool x = true;
          Console.Write(Convert.ToString(x));
        }
      }
    }
        

    A: True

    B: true

    C: False

    D: false

    Ans: A) True

    Explanation: In the above C# code, we are using Convert.ToString() method which converts a bool to string. Thus, the output will be "True".

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

    using System;
    
    namespace MyApplication {
      class Program {
        static void Main(string[] args) {
          double x = 10.25;
          Console.Write(Convert.ToInt32(x));
        }
      }
    }
        

    A: 10.30

    B: 10.25

    C: 10

    D: Error

    Ans: C) 10

    Explanation: In the above C# code, we are using Convert.ToInt32() method which converts a double to int. Thus, the output will be "10".

  6. What is 'Console' in C#?

    A: Class

    B: Object

    C: Method

    D: Structure

    Ans: A) Class

    Explanation: In C#, the Console class is used to represent the standard input, output, and error streams for console applications.

  7. What will be the output of the following C# code, if the input is 123?

    using System;
    
    namespace MyApplication {
      class Program {
        static void Main(string[] args) {
          Console.WriteLine("Enter a number:");
          int num = Console.ReadLine();
          Console.WriteLine("Given number is: " + num);
        }
      }
    }
        

    A: Given number is:123

    B: Given number is: 123

    C: Given number is: "123"

    D: Error

    Ans: D) Error

    Explanation: In C#, Console.ReadLine() is used to read a string. Here, we are trying to assign the input to an int variable directly, which causes an error. The error is: Cannot implicitly convert type 'string' to 'int'.

  8. What will be the output of the following C# code, if the input is 123?

    using System;
    
    namespace MyApplication {
      class Program {
        static void Main(string[] args) {
          Console.WriteLine("Enter a number:");
          int num = Convert.ToInt32(Console.ReadLine());
          Console.WriteLine("Given number is: " + num);
        }
      }
    }
        

    A: Given number is:123

    B: Given number is: 123

    C: Given number is: "123"

    D: Error

    Ans: B) Given number is: 123

    Explanation: In C#, Console.ReadLine() reads input as a string. Using Convert.ToInt32(), we convert the input to an int, so there is no error. Output will be: Given number is: 123.

  9. Which is/are the correct method(s) to input a float value in C#?

    A: Parse(Console.ReadLine())

    B: ToSingle(Console.ReadLine())

    C: ToFloat(Console.ReadLine())

    D: Both A and B

    E: Both A and C

    Ans: D) Both A and B

    Explanation: In C#, the following methods can be used to input a float value:

    • float.Parse(Console.ReadLine()): Parses a string to a float.
    • Convert.ToSingle(Console.ReadLine()): Converts a string to a single-precision floating-point number.

    ToFloat(Console.ReadLine()) is not a valid method in C#.

  10. What is the output of the program?

    void main()
    {
      int const *p = 5;
      cout << ++(*p);
    }

    A: 5

    B: Memory value

    C: Compiler error

    D: Garbage value

    Ans: [Your Answer]
  11. What is the output of the program?

    main()
    {
      char s[] = "man";
      int i;
      for(i = 0; s[i]; i++)
        cout << s[i];
    }

    A: mmmm aaaa nnnn

    B: man

    C: Compiler error

    D: None of the above

    Ans: [Your Answer]
  12. What is the output of the program?

    main()
    {
      float me = 1.1;
      double you = 1.1;
      if(me == you)
        cout << "I love U";
      else
        cout << "I hate U";
    }

    A: I hate U

    B: I love U

    C: Garbage value

    D: None of the above

    Ans: [Your Answer]
  13. C# is a programming language, developed by ___.

    A: Oracle

    B: Microsoft

    C: GNU project

    D: Google

    Ans: B
  14. C# runs on the ___.

    A: .NET Framework

    B: Java Virtual Machine

    C: Both A and B

    D: None of the above

    Ans: A
  15. C# programming language is used to develop:

    A: Web apps

    B: Desktop apps

    C: Mobile apps

    D: All of the above

    Ans: D
  16. Is C# an object-oriented programming language?

    A: Yes

    B: No

    Ans: A
  17. Select the query through which you can display the records within a given range?

    A: select row from emp where rowname <=&rangeend

    B: select row from emp where rowname <&rangeend

    C: select column from emp where rowname &rangeend

    D: select column from emp where rowname <=&rangeend

    Ans: A




 


.

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-2024 Vyom Technosoft Pvt. Ltd., All Rights Reserved. Read our Privacy Policy