Fresher Drive @ 27 September - C#, SQL

25 Questions | Total Attempts: 54

SettingsSettingsSettings
Please wait...
Fresher Drive @ 27 September - C#, SQL


Questions and Answers
  • 1. 
    Default namespace in dotnet?
    • A. 

      System

    • B. 

      Math

    • C. 

      Object

    • D. 

      Text

  • 2. 
    Access modifier for destructor?
    • A. 

      Private

    • B. 

      Public

    • C. 

      Any

    • D. 

      None

  • 3. 
    Int is a?
    • A. 

      Class

    • B. 

      Datatype

    • C. 

      Both

    • D. 

      None of these

  • 4. 
    Signature of function contains?
    • A. 

      Parameters of functions

    • B. 

      Name of function

    • C. 

      Parameters & name of function

    • D. 

      Return type, parameters & name of function

  • 5. 
    Using which we can define the function in child class of same signature of function in parent class?
    • A. 

      Using Virutal

    • B. 

      Using New

    • C. 

      Using Abstract

    • D. 

      Using Override

  • 6. 
    Is there any class in C# which on which v can use inheritance?
    • A. 

      System.Delegate

    • B. 

      System.Math

    • C. 

      System.Array

    • D. 

      System.ValueType

  • 7. 
    What will be the O/P of following program?const int i=j+4;    const int j=k-1;    const int k=2;    public static void main()    {       System.Console.Println("{0}{1}{2}",i,j,k);    }
    • A. 

      4 1 2

    • B. 

      5 1 2

    • C. 

      4 -1 2

    • D. 

      3 1 2

  • 8. 
    Which modifier cant be used with class name?
    • A. 

      Internal

    • B. 

      Public

    • C. 

      Protected

    • D. 

      All

  • 9. 
    Can we call destructor arbitrarily?
    • A. 

      Yes

    • B. 

      No

  • 10. 
    Which access modifier destructor can have?
    • A. 

      Private

    • B. 

      Public

    • C. 

      Protected

    • D. 

      None

  • 11. 
    Destructor can be parameterized.
    • A. 

      True

    • B. 

      False

  • 12. 
    O/P of program belowpublic class zzz    {      static int i;      static bool j;      public static void Main()      {         System.Console.WritleLine(zzz.i+ " " +zzz.j);      }    }
    • A. 

      Null Null

    • B. 

      -1 false

    • C. 

      1 true

    • D. 

      0 false

  • 13. 
    O/P of program belowpublic class zzz    {      static int i=j+10;      static int j=i+1;      public static void Main()      {         System.Console.WritleLine(zzz.i+ " " +zzz.j);      }    }
    • A. 

      Null Null

    • B. 

      10 1

    • C. 

      10 11

    • D. 

      None

  • 14. 
    Which one is truei) A class inhertits everything from its base class except the constructors and destructors.ii) A derived class can inherit all the members of base class but cant subtract or remove members of base class.iii) A derived class can hide members of the base class by creating functions of same name. The original member in base class remains unchanged and uneffected by whatever is happening in derived class, it remains unchanged in the base class, its simply not visible in derived class.
    • A. 

      None

    • B. 

      All

    • C. 

      I & II

    • D. 

      II & III

  • 15. 
    Can we use * (asterisk) sign in c#?
    • A. 

      Yes

    • B. 

      No

  • 16. 
    Does the View occupy memory space?
    • A. 

      True

    • B. 

      False

  • 17. 
    Can u drop a table if it has a view?
    • A. 

      Yes

    • B. 

      No

  • 18. 
    Can we use ORDER BY clause in the definition of a view?
    • A. 

      Yes

    • B. 

      No

  • 19. 
    When do one need to recompile stored procedure?
    • A. 

      If a new index is added from which the stored procedure might benefit

    • B. 

      New column is added to table

    • C. 

      Table data is updated

    • D. 

      All

  • 20. 
    Can a Stored Procedure call itself (recursive)?
    • A. 

      Yes

    • B. 

      No

  • 21. 
    What is the difference between UNION and JOINS?
    • A. 

      Join selects columns

    • B. 

      Union selects rows.

    • C. 

      Both

    • D. 

      None

  • 22. 
    Diff b/w primary key and unique key.a) Primary is always uniqueb) unique can be nullc) primary can be nulld) unique is primary
    • A. 

      A,b

    • B. 

      B,c

    • C. 

      C,d

    • D. 

      D,a

  • 23. 
    Difference between char and nvarchar a) char[(n)] - Fixed-length non-Unicode character data with length of n bytes.b) nvarchar(n) - Variable-length Unicode character data of n characters. c) char cant have numbersd) none
    • A. 

      A,c

    • B. 

      B,d

    • C. 

      B,c

    • D. 

      A,b

  • 24. 
    Function can use DML statements
    • A. 

      True

    • B. 

      False

  • 25. 
    Stored Procedure always have to return a value
    • A. 

      True

    • B. 

      False

Back to Top Back to top