UPWORK TEST » September 24, 2015

Daily Archives: September 24, 2015

Upwork .Net Technology

Dot Net 2.0 using C# Test 2016

Published by:

1. Which of the following are true when comparing built in types for equality?

Answers:

  1. Integral types are considered equal if they represent the same value.
  2. Object types are considered equal if they both refer to the same object or if both are null
  3. String types are considered equal if they have identical lengths and identical characters in each character position
  4. String types are considered equal if they have identical dimensions and identical content at each array index

2. Which of the following types guarantee atomic reads and writes?

Answers:

  1. int
  2. double
  3. string
  4. long
  5. float

3. Which of the following types are derived from System.Reflection.MemberInfo?

Answers:

  1. System.Reflection.PropertyInfo
  2. System.Reflection.EventInfo
  3. System.Type
  4. System.Reflection.InstanceInfo

4. Which of the following applies to interface inheritance?

Answers:

  1. If a class implements an interface, the implementation can be provided by a public member of a base class.
  2. A class may partially implement an interface by only declaring some of the members
  3. Interface methods may be implemented so that they are NOT directly accessible using an instance reference to the class
  4. Since interface implementation methods can not be declared private,protected, or internal, they are always accessible from any point in an application

5. Which of the following operators can be overloaded?

Answers:

  1. Assignment (=)
  2. Conditional (&&,||)
  3. Logical (&,|,^)
  4. Shift (<<, >>)

6. Which of the following are true about using the System.Messaging.MessageQueue class?

Answers:

  1. It provides communication across heterogeneous networks
  2. It provides communication when one of the endpoints may be off-line
  3. It may behave differently depending on the current operating system
  4. A new system level queue may be created simply by creating an instance of MessageQueue.

7. Which of the following characteristics are found in an iterator?

Answers:

  1. It is a statement block which may contain a yield return statement to provide the next value of the iteration
  2. It is a statement block which may contain a yield break statement to provide the next value of the iteration
  3. It is a statement block which may contain a yield return statement to indicate that the iteration is complete
  4. It is a statement block which may contain a yield break statement to indicate that the iteration is complete
  5. It is a class which implements Ienumerable

8. Which of the following are true for parameters?

Answers:

  1. Changes to value parameters always involve making a copy of the original argument
  2. Items passed as Reference Parameters must be initialized prior to the call.
  3. Output Parameters do not need to be assigned inside the method
  4. Variable Length argument lists are not supported

9. Which of the following are true about using ADO.NET DataSets and DataTables?

Answers:

  1. The connection to the database must remain valid for the life of the data objects
  2. All tables in a dataset must come from the same database.
    A given instance of a DataTable can be in only one DataSet
  3. Changes made to multiple tables within a DataSet can easily be extracted to a new DataSet which contains only the changes
  4. Content from multiple DataSets can easily be combined into a single DataSet that contains the net result of all changes.

10. Which of the following are true with respect to the standard implementation of Garbage Collection?

Answers:

  1. Objects must be set to null in order to be eligible for garbage collection
  2. Unless specific steps are taken, an object may be moved in memory
  3. Objects become eligible for garbage collection as soon as it is impossible for any code to access it
  4. Objects which implement finalizers will always have the finalizer called at some point

11. Which of the following are true about Nullable types?

Answers:

  1. A Nullable type is a reference type.
  2. A Nullable type is a structure.
  3. An implicit conversion exists from any non-nullable value type to a nullable form of that type.
  4. An implicit conversion exists from any nullable value type to a non-nullable form of that type.

12. Which of the following are true about declarative attributes?

Answers:

  1. They must be inherited from the System.Attribute.
  2. Attributes are instantiated at the same time as instances of the class to which they are applied.
  3. Attribute classes may be restricted only to be applied to application element types.
  4. By default, a given attribute may be applied multiple times to the same application element.

13. What output will be generated by the following code?

StringBuilder sb = new StringBuilder(10);
sb.AppendFormat(“1234567890123”);
Console.WriteLine(sb.Capacity);

Answers:

  1. 10
  2. 20
  3. Some value equal to or larger than 13
  4. Int32.MaxValue

14. The term Encapsulation is most commonly used to mean:

Answers:

  1. separating an item’s public interface from the actual implementation
  2. embedding content as a resource into an executable program
  3. providing a short summary description of complex operations
  4. a technique using base and derived classes

15. Which of the following are true about namespaces and assemblies?

Answers:

  1. A single assembly may contain multiple namespaces
  2. The same namespace may be used in multiple assemblies
  3. Namespaces may be aliased to provide a shorthand notation for a fully qualified identifier
  4. All of the above

16. Which of the following are true about pointers?

Answers:

  1. C# does not support the use of “*” to indicate a pointer.
  2. Pointers are a type derived from System.Object
  3. Pointers can be used as out and ref type parameters
  4. Pointer references are tracked by the garbage collector.

17. The framework provides three different timer classes. Select the answer that properly matches the class with the listed characteristic.

Answers:

  1. System.Threading.Timer A simple timer which requires a delegate to be supplied for execution when the timer expires. Execution of the method provided by the delegate will be invoked on a ThreadPool Thread.
  2. System.Timers.Timer: Designed for use with worker threads in a multithreaded environment. Can move among threads to handle the raised Elapsed event May result in more accuracy than the System.Windows.Forms.Timer instances.
  3. System.Windows.Forms.Timer A lower resolution timer which requires a UI message pump on the creating thread.
  4. All of the above

18. Transactions initiated in which of the following are supported by System.Transactions infrastructure?

Answers:

  1. SQL Server
  2. ADO.NET
  3. MSMQ
  4. Microsoft Distributed Transaction Coordinator (MSDTC).
  5. All of the above

19. Which of the following is not a valid value for DataRowState?

Answers:

  1. Added
  2. Modified
  3. Dirty
  4. Detached
  5. Deleted

20. With which class is the task of mapping a specific point in time into units, such as weeks, months, and years accomplished?

Answers:

  1. System.DateTime
  2. System.TimeSpan
  3. System.Globalization.Calendar
  4. System.Globalization.CultureInfo

21. Which of the following are required to be true by objects which are going to be used as keys in a System.Collections.HashTable?

Answers:

  1. They must handle case-sensitivity identically in both the GetHashCode() and Equals() methods.
  2. Key objects must be immutable for the duration they are used within a HashTable.
  3. Get HashCode() must be overridden to provide the same result, given the same parameters, regardless of reference equalityl unless the HashTable constructor is provided with an IEqualityComparer parameter.
  4. All of the above

22. Which of the following is NOT a valid C# preprocessor directive?

Answers:

  1. #define
  2. #line
  3. #include
  4. #error
  5. #pragma

23. Which of the following are valid as the underlying type for an enumeration?

Answers:

  1. int
  2. sbyte
  3. long
  4. All of the above

24. Which of the following can an interface NOT contain?

Answers:

  1. Methods
  2. Events
  3. Fields
  4. Indexers

25. Which of the following is true about exceptions?

Answers:

  1. Exceptions should be derived from the System.Exception, but are not required to do so.
  2. If no catch block is found for an exception, and the source is not a static constructor, a System.ThreadException will be thrown
  3. Mathematical errors such as divide by zero, or numeric overflow will generate an exception that is derived from System.Exception
  4. Every throw statement must have at least one catch block

26. Which of the following is false regarding arrays?

Answers:

  1. For reference types A and B; if a conversion from A to B exists, a conversion from A[] to B[] also exists
  2. For value types A and B; if a conversion from A to B exists, a conversion from A[] to B[] also exists
  3. Assignments to arrays elements may require a runtime check to validate the type safety of the assignment

27. Which of the following is an effect of marking resources in satellite assemblies?

Answers:

  1. It renders the resources unavailable.
  2. It ensures that resources are used only with the appropriate culture
  3. It prevents identifier collisions between multiple satellite assemblies
  4. It has no impact since access specifiers for resources are not applied.

28. When developing a managed client to be used with an existing COM Component, __________.

Answers:

  1. you should modify the COM component to enable CLR functionallity.
  2. you should use TlbImp.exe to create a managed wrapper
  3. you should use TlbExp.exe to create a managed wrapper
  4. you should enable an unsafe code

29. Which of the following is true about C# generics?

Answers:

  1. C# allows non-type template parameters
  2. C# supports explicit specialization
  3. C# allows the type parameter to be used as the base class for the generic type
  4. C# allows a generic type parameter itself to be a generic
  5. C# enforces that all codes are valid for all types of parameters

30. Which System.Runtime.Remoting class is used to store all relevant information required to generate a proxy in order to communicate with a remote object?

Answers:

  1. ObjRef
  2. MarshalByRefObject
  3. ObjectHandle
  4. RemotingServices

31. Which of the following characteristics is found in The DateTime type?

Answers:

  1. It always references the UTC (GMT) time
  2. It always references the Local time
  3. It contains a member indicating which time zone it refers to
  4. It contains a member indicating whether it is UTC, Local, or Unspecified

32. Which of the following are true about anonymous methods?

Answers:

  1. Anonymous methods have access to the local state of the containing function member.
  2. An anonymous method requires an explicit method signature
  3. An anonymous method can impact the lifetime of local variables and parameters of the containing function
  4. A struct may not declare an anonymous method which directly references member fields

33. Elements in a System.Collections.Specialized.OrderedDictionary are:

Answers:

  1. sorted by Key
  2. sorted by Element
  3. not sorted

34. Which of the following is NOT part of an assembly?

Answers:

  1. Manifest
  2. MetaData
  3. Intermediate Language Code
  4. Resources
  5. Native Executable Code

35. Which of the following characteristics do classes in the System.Drawing namespace such as Brush,Font,Pen, and Icon share?

Answers:

  1. They encapsulate native resources and must be properly Disposed to prevent potential exhausting of resources.
  2. They are Value Type objects.
  3. You can inherit from these classes to provide enhanced or customized functionality
  4. None of the Above

36. Which of the following is not a valid attribute for impacting serialization?

Answers:

  1. DataContractAttribute
  2. DataMemberAttribute
  3. EnumMemberAttribute
  4. CollectionDataContractAttribute
  5. DataObjectAttribute

37. class Sample
{
public Sample(int x) { }
}

In the above code, which of the following other class constructors can directly access the provided constructor?

Answers:

  1. public Sample() : this(1) { }
  2. public Sample() : Sample(1) {}
  3. Both the above.
  4. One class constructor can not directly access another constructor

38. Which of the following code samples will cause a compilation error?

Answers:

  1. class SampleClass {} class SampleClass<T> {}
  2. class SampleClass<T> {} class SampleClass<T,U> {}
  3. class SampleClass<T> where T : class { } class SampleClass<T> where T : struct { }
  4. class SampleClass {} class SampleClass<T> where T : class { }

39. Which of the following are true about statements?

Answers:

  1. A while statement will always execute its body at least once.
  2. A for loop will always execute its body at least once.
  3. A try statement must always include at least one catch block
  4. A case clause within a switch statement may not fall through to the next case clause

40. If two assemblies contain the same fully qualified class, which of the following will be true?

Answers:

  1. It is impossible to add a reference to both assemblies to any given assembly
  2. A new root can be added to the assemblies namespace hierarchy by the use of an extern alias
  3. The specific colliding name may be altered by using an extern alias
  4. The collision may be avoided by using a statement to provide an alias

41. Which of the following are true about delegates?

Answers:

  1. A delegate requires an instance method be supplied.
  2. A delegate instance may encapsulate only one method
  3. Delegates are not typesafe
  4. A delegate instance does not know or care about the class type of the encapsulated method

42. When Deleting a DataRow from the DataRowCollection of a DataTable, you can:

Answers:

  1. use the DataRowCollection.Remove method to immediately delete the row.
  2. use the DataRowCollection.Remove method to mark the row for deletion when DataRow.AcceptChanges is called.
  3. use the DataRow.Delete method to immediately delete the row.
  4. use the DataRow.Delete method to mark the row for deletion when DataRowAcceptChanges is called.

43. Which of the following is NOT a requirement for an application to be certified in the “Certified for Windows Program”?

Answers:

  1. Usage of system settings for size, color, and font
  2. Support for Windows “High Contrast” option
  3. Usage of sound to notify of critical information
  4. Keyboard only access to all features including menus, and controls

44. Which access limitation does a class member declared protected internal have?

Answers:

  1. Access is limited to the containing class plus any classes derived from the containing class
  2. Access is limited to the current assembly
  3. Access is limited to the containing class plus any classes derived from the containing class that are also in the current assembly
  4. Access is limited to the containing class plus any classes derived from the containing class or any other class in the current assembly

45. Which of the following operations can NOT be performed inside a catch block?

Answers:

  1. Prevention of the caught exception from leaving the catch block
  2. Allowing the original exception to propagate after it has been caught, with all of the information (including context) intact
  3. Wrapping the caught exception inside a newly created exception of a different type
  4. Generating a new exception with no information about the original exception
  5. Altering the Message , TargetSite and/or StackTrace, of the existing exception before re-throwing

46. Which of the following is not a standard service behavior supported by the System.ServiceProcess.ServiceController class members?

Answers:

  1. Start
  2. Continue
  3. Pause
  4. Restart

47. In which of the following ways do structs differ from classes?

Answers:

  1. Structs can not implement interfaces
  2. Structs cannot inherit from a base struct
  3. Structs cannot have events interfaces
  4. Structs cannot have virtual methods

48. Which of the following are true about enums?

Answers:

  1. Enums are always equated to an integral constant value
  2. A variable of the enum type will always contain one of the declared symbolic constants
  3. The declared values of an enum are always assigned sequential starting with 0
  4. The declared values of an enum must be mapped (explicitly or implicitly) to unique integral values

49. Which of the following are characteristics of the System.Threading.Timer class?

Answers:

  1. The method provided by the TimerCallback delegate will always be invoked on the thread which created the timer.
  2. The thread which creates the timer must have a message processing loop (i.e. be considered a UI thread)
  3. The class contains protection to prevent reentrancy to the method provided by the TimerCallback delegate
  4. You can receive notification of an instance being Disposed by calling an overload of the Dispose method.

50. Custom non-fatal exceptions should be derived from:

Answers:

  1. ApplicationException
  2. DataMisalignedException
  3. ExecutionEngineException
  4. SystemException

51. Which of the following are defined as a “token”?

Answers:

  1. Identifier
  2. Whitespace
  3. Punctuator
  4. Operator
  5. All of the above

52. Of which elements does Generics allow parameterization by type?

Answers:

  1. Classes
  2. Structs
  3. Methods
  4. Fields

53. To which of the following can System.IO.IsolatedStorage not be scoped?

Answers:

  1. Restricted to a Specific Application
  2. Restricted to a Specific AppDomain
  3. Restricted to a Specific User
  4. Restricted to a specific Physical Media

54. When using the Demand method of System.Security.IPermission, which of the following will occur?

Answers:

  1. The permissions of the code which invoked the Demand method will be evaluated.
  2. For permissions which do a stack walk, an exception will occur only if NONE of the calling codes has the required permission
  3. For permissions which do a stack walk, an exception will occur if ANY of the calling codes does not have the required permission
  4. The permission levels of individual stack frames are always checked regardless of the permission type.

55. Which of the following are true about event handling?

Answers:

  1. One method may handle events from different sources
  2. A single event can be handled by multiple methods
  3. Event handlers can be dynamically added and removed at runtime
  4. All of the above

56. Which of the following conditions are true regarding System.Diagnostics.Trace?

Answers:

  1. Trace is enabled for both Release and Debug initial configurations
  2. Trace can be controlled both by preprocessor directives, and compiler directives
  3. To change the severity levels which generate output, you must recompile your program
  4. All of the Above

57. Parameterized Properties in C# are__________.

Answers:

  1. not supported except for implementing an indexer.
  2. properties which take one or more parameters (e.g. to retrieve one element from a member collection)
  3. properies which use one or more attributes to control their behavior
  4. properties which can be passed as Method Parameters so they can be invoked by the called method.

58. Which System.Runtime.Remoting class is used store all relevant information required to generate a proxy in order to communicate with a remote object?

Answers:

  1. ObjRef
  2. MarshalByRefObject
  3. ObjectHandle
  4. RemotingServices

59. Determining the availability of sufficient memory for an operation can be accomplished by?

Answers:

  1. There is no supported application level means to determine if a specific amount of memory is available.
  2. using static methods of System.Runtime.MemoryFailPoint and checking the return value
  3. creating an instance of System.Runtime.MemoryFailPoint and monitoring for an InsufficientMemoryException
  4. creating an instance of System.Runtime.MemoryFailPoint and monitoring for an OutOfMemoryException

60. Which of the following is not an application entry point?

Answers:

  1. public static void Main() {}
  2. public static int Main() {}
  3. public static int Main(string[] args) {}
  4. public static int Main(string cmdline) {}
  5. private static int Main(string[] args) {}

61. What will be the output generated by the following code?
string t = “This Is a Test”;

t.Replace(“T”, “?”);

Console.WriteLine(t);

Answers:

  1. ?his Is a ?est
  2. ?his Is a ?es?
  3. This Is a Test
  4. ?his Is a Test

62. Which of the following does NOT apply to XCOPY deployment?

Answers:

  1. The appropriate version of the .NET framework must be installed.
  2. All application components must be in the application directory, or a subdirectory.
  3. Shared components can be installed as part of the XCOPY.
  4. XCOPY deployment to a non-empty target directory may have unintended side-effects

63. Which of the following are true about operator precedence?

Answers:

  1. The Conditional Operator (?:) has the lowest precedence.
  2. All binary operators are left-associative, and evaluate from left to right.
  3. The Assignment and Conditional Operators are right-associative.
  4. The Conditional And (&&) and Or (||) operators have higher precedence than the Logical And (&) and Or (|) operators.

64. Which of the following encodings are NOT supported by classes in the System.Text namespace?

Answers:

  1. ASCII
  2. Unicode
  3. UTF-7
  4. UTF-8
  5. EBCDIC

65. Which of the following can Interfaces contain?

Answers:

  1. Methods
  2. Properties
  3. Fields
  4. Conversion operators
  5. Events

66. Which of the following is a primary characteristic of System.Xml.XmlDataDocument?

Answers:

  1. It provides synchronized operations viewing the content either as an XmlDocument or as a DataSet
  2. It provides the basic abilities for XMLDocument instances to be created from or exported to DataSets
  3. It provides a limited set of capabilities compared to the System.Xml.XmlDocument class
  4. It provides the basic abilities to allow DataSets to be loaded from or exported to XML files.

1,614 total views, 2 views today

Upwork .Net Technology

ASP.Net 3.5 using VB Test 2016

Published by:

1. Which of the following mechanisms are not suitable for returning a single row from a DataTable containing a large number of records?

Answers:

  1. DataTable.Rows.Find
  2. DataTable.Rows.Select
  3. DataTable.Select
  4. Enumerating across DataTable.Rows

2. Given the following code, which of the following are syntactically correct?

<Extension()> _
Public Function AppendTest(ByVal s As String, ByVal suffix As String)
Return s & suffix
End Function

Answers:

  1. Dim s As String = “test” s = s.AppendTest(s, “suffix”)
  2. Dim s As String = “test” s = s.AppendTest(“suffix”)
  3. Dim s As String = “test” s = AppendTest(s, “suffix”)
  4. Dim s As String = “test” s = AppendTest(“suffix”)

3. Which of the following types guarantee atomic reads and writes?

Answers:

  1. int
  2. double
  3. string
  4. long
  5. float

4. Which of the following are true regarding validation in an ASP.NET application?

Answers:

  1. Server validation should only be used when there is no client side validation.
  2. All data should be validated on the server side.
  3. Client Side validation typically provides a faster response (feedback) time than server validation
  4. A page can not be posted back unless all client validation has passed.

5. Which of the following are true of using ADO.NET DataSets and DataTables?

Answers:

  1. The connection to the database must remain valid for the life of the data objects
  2. All tables in a dataset must come from the same database.
  3. A given instance of a DataTable can be in only one DataSet
  4. Changes made to multiple tables within a DataSet can easily be transferred to a new DataSet which contains only the changes
  5. Content from multiple DataSets can easily be combined into a single DataSet that contains the net result of all changes.

6. What is the result of the following code?

Console.WriteLine(CBool(If(1>2, “True”, “False”)))

Answers:

  1. Throws an InvalidCastException
  2. TRUE
  3. FALSE
  4. None of the above

7. Given the following code, which calls are valid ways to add the elements of a string array to a List(Of String)?

Dim values() As String = {“1”, “2”, “3”, “4”}
Dim valueList As New List(Of String)

Answers:

  1. valueList.Insert(values)
  2. valueList = values
  3. valueList.Add(values)
  4. valueList.AddRange(values)

8. Determining the availability of sufficient memory for an operation can be accomplished by:

Answers:

  1. There is no supported application level means to determine if a specific amount of memory is available.
  2. using static methods of System.Runtime.MemoryFailPoint and checking the return value
  3. creating an instance of System.Runtime.MemoryFailPoint and monitoring for an InsufficientMemoryException
  4. creating an instance of System.Runtime.MemoryFailPoint and monitoring for an OutOfMemoryException

9. With which of the following are Declarative Databinding expressions delimited?

Answers:

  1. <%# %>
  2. <%– –%>
  3. <!– –>
  4. <# >

10. Which of the following are valid mechanisms for adding an event handler for Public Event SomeEvent() on class Sample?

Answers:

  1. AddHandler Sample.SomeEvent AddressOf MyEventHandler Public Sub MyEventHandler
  2. AddHandler Sample.SomeEvent, AddressOf Sample.SomeEvent
  3. Private WithEvents sample As New Sample Public Sub MyEventHandler(sender As Object, e As EventArgs) Handles sample.SomeEvent
  4. Private WithEvents sample As New Sample Public Sub MyEventHandler() Handles sample.SomeEvent

11. What does the AndAlso operator do?

Answers:

  1. It performs a Boolean AND operation, evaluating both operands
  2. It performs a Boolean AND operation, evaluating the left-hand side only if the right-hand side is false
  3. It performs a Boolean AND operation, evaluating the right-hand side only if the left-hand side is false
  4. It performs a Boolean AND operation, evaluating the right-hand side only if the left-hand side is true
  5. None of the above

12. With which class is the task of mapping a specific point in time into units such as weeks, months, and years accomplished?

Answers:

  1. System.DateTime
  2. System.TimeSpan
  3. System.Globalization.Calender
  4. System.Globalization.CultureInfo

13. By which of the following can the .NET class methods be included in .aspx files?

Answers:

  1. Including .Net code within the script element with the runat attribute set to server
  2. Including .Net code within the code element
  3. Including .Net code using the @code directive on the page
  4. Including .Net code within the execute attribute of the individual control

14. Which of the following can you do when deleting a DataRow from the DataRowCollection of a DataTable?

Answers:

  1. Use the DataRowCollection.Remove method to immediately delete the row.
  2. Use the DataRowCollection.Remove method to mark the row for deletion when DataRow.AcceptChanges is called.
  3. Use the DataRow.Delete method to immediately delete the row.
  4. Use the DataRow.Delete method to mark the row for deletion when DataRowAcceptChanges is called.

15. Which of the following events should be used for assigning a Theme dynamically to a page?

Answers:

  1. PreInit
  2. Init
  3. PreLoad
  4. PreRender
  5. Render

16. Which of the following is applicable when using Secure Socket Level communications?

Answers:

  1. A certificate must be installed on the server.
  2. The certificate must match the web address to prevent a browser warning or error
  3. The certificate must be issued by an authority recognized by the client computer to prevent a browser warning or error
  4. Once issued, a certificate is always valid until the expiration date.

17. Which of the following is true about VB generics?

Answers:

  1. VB allows non-type template parameters
  2. VB supports explicit specialization
  3. VB allows the type parameter to be used as the base class for the generic type
  4. VB allows a generic type parameter itself to be a generic
  5. VB enforces that all codes are valid for all types of parameters

18. In which of the following ways do Structures differ from classes?

Answers:

  1. Structures cannot implement interfaces
  2. Structures cannot inherit from a base structure
  3. Structures cannot have events
  4. Structures cannot have overrideable methods

19. The earliest event in which all viewstate information has been restored is:

Answers:

  1. Init
  2. PreLoad
  3. Load
  4. PreRender
  5. Render

20. Which method calls will compile the following?

Private Sub Sample(ByVal number As Integer, Optional ByVal bool As Boolean = True)
End Sub

Answers:

  1. Sample(1, True)
  2. Sample(1)
  3. Sample(bool:=False)
  4. Sample(bool:=False, number:=1)
  5. Sample(bool:=False, 1)

21. The rights of which Windows Account does anonymous Web Site access use by default?

Answers:

  1. Administrator
  2. IUSER_MachineName (where the MachineName is the actual computer name)
  3. ASPNET
  4. Guest

22. In order to enable AJAX Functionality, which control is placed on the page?

Answers:

  1. asp:ScriptManager
  2. asp:AjaxManager
  3. asp:PageManager
  4. asp:ClientScriptManager

23. Via which of the following is ViewState maintained by default?

Answers:

  1. A hidden variable within the page that is included with each round tip.
  2. A cookie which resides on the client’s computer
  3. A server side in-process memory cache
  4. Instance member variables of the Page class

24. In order to use the AJAX AuthenticationSErvice class, which of the following must be true?

Answers:

  1. It must be enabled in the web.config of the ASP.Net application.
  2. Forms Authentication must be enabled in the web.config of the ASP.Net Application
  3. Cookies must be enabled in the browser
  4. A redirection url must be supplied for successful login.
  5. All of the above.

25. In the following example,by which technique can the method Test in the derived class Cat access the implementation of MakeNoise in the base class?

Public Class Animal
Public Overridable Sub MakeNoise()
End Sub
End Class

Public Class Cat

Answers:

  1. Once overridden, the base class members are inaccessible rom the derived class.
  2. Public Sub Test() Animal.MakeNoise() End Sub
  3. Public Sub Test() MyBase.MakeNoise() End Sub
  4. Public Sub Test() CType(Me, Animal).MakeNoise() End Sub

26. Which of the following will be executed without error?

Public Class Fruit
End Class

Public Class Apple
Inherits Fruit
End Class

Answers:

  1. Dim list As New List(Of Fruit) list.Add(New Apple) list.Add(New Fruit) Dim apple As Apple = list(0)
  2. Dim list As New List(Of Fruit) list.Add(New Apple) list.Add(New Fruit) Dim fruit As Fruit = list(0)
  3. Dim list As New List(Of Apple) list.Add(New Apple) list.Add(New Fruit) Dim apple As Apple = list(0)
  4. Dim list As New List(Of Apple) list.Add(New Apple) list.Add(New Fruit) Dim fruit As Fruit = list(0)

27. Which of the following are true when using a POST command to access a WebService method?

Answers:

  1. There is a size limitation on the parameters that can be passed
  2. A query string is used to pass the parameters.
  3. By default, JSON formatting is used for serialization
  4. By default, XML formatting is used for serialization
  5. The data is automatically deserialized into .NET types before the actual Web Service method is invoked.

28. The earliest event where one can be assured all child controls exist is:

Answers:

  1. Load
  2. LoadComplete
  3. PreRender
  4. Init

29. Identify the syntactically correct LINQ query or queries, assuming dt is a DataTable

Answers:

  1. Dim result = (From r In dt Select r.Field(Of Int32)(“Value”)).Max
  2. Dim result = Select r.Field(Of Int32)(“Value”)).Max From dt
  3. Dim result = Select Max(“Value”) From dt.AsEnumerable
  4. Dim result = Aggregate r In dt Into Max(r.Field(Of Integer)(“value”))

30. By which contract are the WS-Addressing action and reply action elements of the soap envelope controllable when the Windows Communication Foundation is used?

Answers:

  1. ServiceContract
  2. OperationContract
  3. DataContract
  4. MessageContract

31. Which of the following differentiates a UserControl from a Custom Server control?

Answers:

  1. UserControl can directly express rendering information via markup; a Custom Server control can not.
  2. UserControl does not require the use of the @Register directive; a Custom Server control does require it.
  3. UserControl can make use of script based validation; a Custom Server control can not.
  4. UserControl can represent complete compositate hierarchy; a Custom Server control can not.

32. In which file are Predefined Client Side Validation Scripts defined?

Answers:

  1. WebUIValidation.js
  2. ClientValidation.js
  3. AspNetValidation.js
  4. USerValidation.js

33. Identify the syntactically correct LINQ query or queries, assuming dt is a DataTable

Answers:

  1. Dim key As String = “test” Dim result = From r In Dt Where r(0) = key Select r(1)
  2. Dim key As String = “test” Dim result = From r In dt.AsEnumerable Where r(0) = key Select r(1)
  3. Dim key As String = “test” Dim result = Select r(1) From r In Dt Where r(0) = key
  4. Dim key As String = “test” Dim result = Select r(1) From r In Dt.AsEnumerable Where r(0) = key

34. What is the result of Console.WriteLine(“{0}:{1}:{2}”, CInt(2.5), CInt(1.5), Fix(1.5))?

Answers:

  1. 2:2:2
  2. 3:2:2
  3. 3:2:1
  4. 2:2:1

1,330 total views, 2 views today

Upwork .Net Technology

ASP.Net 3.5 using C# Test 2016

Published by:

1. Which of the following does using Initializer Syntax with a collection as shown below require?

CollectionClass<int> numbers = new CollectionClass<int> { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };

Answers:

  1. Collection Class must implement System.Collections.Generic.ICollection<T>
  2. Collection Class must implement System.Collections.Generic.IList<T>
  3. Each of the Items in the Initializer List will be passed to the Add<T>(T item) method

2. Which of the following types guarantee atomic reads and writes?

Answers:

  1. int
  2. double
  3. long
  4. float

3. Which of the following accurately describes the class structure when implementing an ASP.Net page which uses the CodeFile attribute?

Answers:

  1. The actual instantiated class is dynamically created and has a base class defined in the CodeFile.
  2. The actual instantiated class is dynamically created and has a member representing the class defined in the CodeFile.
  3. The actual instantiated class is dynamically created and is a co-class of the class defined in the CodeFile.

4. Which of the following does Event Bubbling allow composite controls to perform?

Answers:

  1. Propagate container related events to the child controls.
  2. Propagate child events up to control hierarchy
  3. Distribute events between peer child controls.
  4. Translate control unhandled control events into exceptions.

5. With which of the following are Declarative Databinding expressions delimited?

Answers:

  1. <%# %>
  2. <%– –%>
  3. <!– –>
  4. <# >

6. Which of the following are true of using ADO.NET DataSets and DataTables?

Answers:

  1. The DataSets and DataTables objects requires continuous connection to the database
  2. All tables in a dataset must come from the same database
  3. A given instance of a DataTable can be in only one DataSet
  4. Content from multiple DataSets can easily be combined into a single DataSet that contains the net result of all changes

7. Which of the following controls allows the use of XSL to transform XML content into formatted content?

Answers:

  1. System.Web.UI.WebControls.Xml
  2. System.Web.UI.WebControls.Xslt
  3. System.Web.UI.WebControls.Substitution
  4. System.Web.UI.WebControls.Transform

8. The following are the two statements regarding the DataRow from the DataRowCollection of a DataTable

Statement X: Use the DataRowCollection.Remove method to immediately delete the row.
Statement Y: Use the DataRow.Delete method to mark the row for deletion when DataRow.AcceptChanges is called.

Answers:

  1. Statement X is correct and Statement Y is incorrect
  2. Statement X is incorrect and Statement Y is correct
  3. Both Statements X, Y are correct
  4. Both Statements X, Y are incorrect

9. Which of the following can be used to preserve application state information?

Answers:

  1. ApplicationState
  2. SessionState
  3. ViewState
  4. All of the above

10. When using asynchronous partial updates with an UpdatePanel, which of the following are true?

Answers:

  1. Only the UpdatePanel and any child controls go through the server lifecycle.
  2. The entire page always goes through the entire lifecycle.
  3. Only the UpdatePanel which initiated the Postback and its child controls can provide updated information.
  4. UpdatePanels can not be used with Master Pages.

11. Which of the following are required to be true by objects which are going to be used as keys in a System.Collections.HashTable?

Answers:

  1. They must handle case-sensitivity identically in both the GetHashCode() and Equals() methods.
  2. Key objects must be immutable for the duration they are used within a HashTable.
  3. Get HashCode() must be overridden to provide the same result, given the same parameters, regardless of reference equality unless the HashTable constructor is provided with an IEqualityComparer parameter.
  4. Each Element in a HashTable is stored as a Key/Value pair of the type System.Collections.DictionaryElement
  5. All of the above

12. Which of the following are true regarding the System.Collections.Generic.HashSet<T> class?

Answers:

  1. HashSet is an unordered collection.
  2. The default EqualityComparer checks whether the element supplied to the HashSet is unique or not.
  3. HashSet provides functionality for “conceptual sets” where the rules for membership can be specified without actually creating all of the items.

13. Which of the following is not a characteristic, that a Query expression should have?

Answers:

  1. It must contain a from clause
  2. It must begin with a select clause
  3. It can end with a group clause

14. Which of the following is false about declarative attributes?

Answers:

  1. They must be inherited from the System.Attribute.
  2. Attribute classes may be restricted to be applied only to application element types.
  3. By default, a given attribute may be applied multiple times to the same application element.

15. When using a JavaScript timer control in conjunction with UpdatePanels, which of the following statements are true?

Answers:

  1. The interval will never restart before the page postback is complete.
  2. The timer control must be located outside of the UpdatePanel
  3. If the timer expiration triggers a postback while a previous postback is in progress, the first postback is canceled.
  4. The timer must always be specified as a trigger for the updatepanel which is to be update when the interval expires.

16. What is the proper declaration of a method which will handle the following event?

Class MyClass
{
public event EventHandler<MyArgs> MyEvent;
}

Answers:

  1. public void A_MyEvent(object sender, MyArgs e) { }
  2. public void A_MyEvent(object sender, EventArgs e) { }
  3. public void A_MyEvent(MyArgs e) { }

17. Which of the following is/are applicable while using Secure Socket Level communications?

Answers:

  1. A certificate must be installed on the server.
  2. The certificate must match the web address to prevent a browser warning or error
  3. The certificate must be issued by an authority recognized by the client computer to prevent a browser warning or error
  4. All of the above

18. Which of the following is false about System.GC under version 3.5 of the .NET Framework?

Answers:

  1. You can request that the garbage collector processes a generation if it determines that it is appropriate at specific points in your code
  2. You can control the intrusiveness of the garbage collector (how often it performs collections) while your program is running
  3. You can control the intrusiveness of the garbage collector (how often it performs collections) only during application initialization

19. Where should an instance of an object which provides services to all users be stored?

Answers:

  1. ApplicationState
  2. SessionState
  3. ViewState
  4. None of the above

20. When using an automatic property, which of the following statements is true?

Answers:

  1. The compiler generates a backing field that is completely inaccessible from the application code.
  2. The compiler generates a backing field that is accessible via reflection.
  3. The compiler generates a code that will store the information separately from the instance to ensure its security.

21. The output generated by the following code will be:

string t = @”ThisIsaTest”;
Response.Write(t);

Answers:

  1. ThisIsaTest
  2. ThisIsaTest
  3. It will give a compilation error: Unrecognized escape sequence

22. Which of the following statements are applicable in LINQ to SQL?

Answers:

  1. It is pure Object Relational (O/R) model.
  2. It is a set of enhancements to the DataSet and DataTable classes.
  3. It requires the use of SQLServer as the database.
  4. Because LINQ is based on Queries, it can not be used to modify the data in the database.

23. Which of the following attributes of the ProcessModel element of the Machine.Config file, is used to specify the level of authentication for DCOM security?

Answers:

  1. comAuthenticationLevel
  2. comImpersonationLevel
  3. maxIoThreads
  4. requestQueueLimit

24. With which class is the task of mapping a specific point in time into units such as weeks, months, and years accomplished?

Answers:

  1. System.Globalization.CultureInfo
  2. System.Globalization.Calendar
  3. System.DateTime

25. Which of the following are common methods of supplying “Help” information to an ASP.NET application?

Answers:

  1. Setting the ToolTip property of a control to a string containing the information.
  2. using the open method of the browser window object to open a new browser window and display a help related ASP.NET page
  3. Using the showHelp method of the browser window object to display a topic from a compiled help file (.chm).
  4. All of the above

26. By which of the following can the .NET class methods be included in .aspx files?

Answers:

  1. Including .Net code within the script element with the runat attribute set to server
  2. Including .Net code within the code element
  3. Including .Net code using the @code directive on the page
  4. Including .Net code within the execute attribute of the individual control

27. Which of the following is not an unboxing conversion?

Answers:

  1. void Sample1(object o) { int i = (int)o; }
  2. void Sample1(ValueType vt) { int i = (int)vt; }
  3. enum E { Hello, World} void Sample1(System.Enum et) { E e = (E) et; }
  4. class C { public int Value { get; set; } } void Sample1(C vt) { int i = vt.Value; }

28. Which of the following can be used to control caching within an ASP.NET application?

Answers:

  1. Using the @OutputCache directive in the .aspx file.
  2. Setting the HttpCachePolicy of the Cache property inside the Response object.
  3. Using the Cache property of the Page Object.
  4. All of the above

29. What will be the impact of using implicitly typed local variables as in the following example?

var sample = “Hello World”;

Answers:

  1. The actual type is determined at compilation time, and has no impact on the runtime
  2. The actual type is determined at runtime, and late binding takes effect
  3. “var” itself is a specific type defined by the framework, and no special binding takes place

30. The earliest event in which all viewstate information has been restored is:

Answers:

  1. Init
  2. PreLoad
  3. Load
  4. Render

31. Which of the following items are recommended when using XML comments to generate documentation?

Answers:

  1. <exception>
  2. <code>
  3. <summary>
  4. All of the above

32. Which of the following conditions can trigger the automatic recycling of an ASP.NET application hosted in IIS?

Answers:

  1. A specific number of requests to the application process.
  2. A percentage of physical memory utilized by the process.
  3. A specific time interval
  4. All of the above

33. To which of the following do automatic properties refer?

Answers:

  1. You declare (explicitly or implicitly) the accessibility of the property and get and set accessors, but do not provide any implementation or backing field
  2. You attribute a member field so that the compiler will generate get and set accessors
  3. The compiler creates properties for your class based on class level attributes
  4. They are properties which are automatically invoked as part of the object construction process

34. Which of the following are true regarding System.Web.Mail and System.Net.Mail namespaces?

Answers:

  1. System.Web.Mail is not supported under version 3.5 of the Framework
  2. System.Web.Mail is deprecated under version 3.5 of the Framework, and it is officially recommended that System.Net.Mail be used.
  3. System.Web.Mail is the preferred solution when using IIS hosted applications
  4. There are no functional differences; the items were moved to a new namespace to better reflect their applicability

35. Which of the following differentiates a UserControl from a Custom Server control?

Answers:

  1. UserControl can directly express rendering information via markup; a Custom Server control can not.
  2. UserControl does not require the use of the @Register directive; a Custom Server control does require it.
  3. UserControl can make use of script based validation; a Custom Server control can not.
  4. UserControl can represent complete compositate hierarchy; a Custom Server control can not.

36. Which of the following is/are true regarding validation in an ASP.NET application?

Answers:

  1. Server validation can be used alongside with client side validation.
  2. All data posted on Server, should be validated.
  3. Client Side validation typically provides a faster response (feedback) time than server validation.
  4. All of the above

37. When using Cascading Style Sheets (CSS) to format output, which of the following is/are true?

Answers:

  1. Styles can be applied to all elements having the same CSS Class attribute
  2. Styles can be applied to specific elements based on their ID attribute
  3. Styles can be applied to elements based on their position in a hierarchy
  4. Styles can be used to invoke script based code
  5. All of the above

38. The following are two statements related to System.DateTimeOffset namespace.

Statement X: DateTimeOffset values can be converted to DateTime values and vice versa.
Statement Y: DateTimeOffset does not supports arithmetical operations

Answers:

  1. Statement X is incorrect and Statement Y is correct
  2. Statement X is correct and Statement Y is incorrect
  3. Both Statements X, Y are correct
  4. Both Statements X, Y are incorrect

39. Which of the following statements is false about Passport Authentication?

Answers:

  1. The Passport SDK must be installed.
  2. Passport authentication requires a network path between the Client and the Microsoft Passport Server
  3. Passport Authentication provides persistent authentication across sessions

40. When using a DataReader to access the results of a Database operation, which of the following is true?

Answers:

  1. The DataReader provides a cursor that can be used to move forward and backwards through the result.
  2. The DataReader provides random access capabilities on the result.
  3. The DataReader can provide the Schema information of the result to the application code.

41. In which file are Predefined Client Side Validation Scripts defined?

Answers:

  1. WebUIValidation.js
  2. ClientValidation.js
  3. AspNetValidation.js
  4. USerValidation.js

42. Which directive allows the utilization of a custom web control in an ASP.NET page?

Answers:

  1. @Register
  2. @Include
  3. @Control
  4. @Import

43. Which of the following are true about System.Security.Cryptography under version 3.5 of the framework?

Answers:

  1. Support is provided for the “Suite B” set of cryptographic algorithms as specified by the National Security Agency (NSA).
  2. Cryptography Next Generation (CNG) classes are supported on XP and Vista systems.
  3. The System.Security.Cryptography.AesManaged class allows custom block size, iteration counts and feedback modes to support any Rijndael based encryption.

44. In order to enable AJAX Functionality, which control is placed on the page?

Answers:

  1. asp:ScriptManager
  2. asp:AjaxManager
  3. asp:PageManager
  4. asp:ClientScriptManager

45. Determining the availability of sufficient memory for an operation can be accomplished by:

Answers:

  1. creating an instance of System.Runtime.MemoryFailPoint and monitoring for an InsufficientMemoryException
  2. creating an instance of System.Runtime.MemoryFailPoint and monitoring for an OutOfMemoryException
  3. There is no supported application level means to determine if a specific amount of memory is available.

46. Custom non-fatal exceptions should be derived from:

Answers:

  1. ApplicationException
  2. DataMisalignedException
  3. ExecutionEngineException
  4. SystemException

47. Which of the following events should be used for assigning a Theme dynamically to a page?

Answers:

  1. PreInit
  2. Init
  3. PreLoad
  4. PreRender
  5. Render

48. Which of the following are performed to fully debug an ASP.NET Application running on the same machine as the debugger?

Answers:

  1. Enabling debug information in the .NET Assembly
  2. Setting the debug attribute of the compilation element to true in the web.config file.
  3. Enabling ASP.NET debugging in the IIS metabase.

49. Which of the following is true about C# generics?

Answers:

  1. C# allows non-type template parameters
  2. C# supports explicit specialization
  3. C# allows the type parameter to be used as the base class for the generic type
  4. C# enforces that all codes are valid for all types of parameters

50. Which of the following are the goals of the Windows Communciation Foundation?

Answers:

  1. Bringing various existing communication technologies into a unified environment.
  2. Cross vendor/platform communication.
  3. Support for asynchronous communications.
  4. Support for distributed applications based on technologies such as MSMQ and/or COM+
  5. All of the above

51. The rights of which Windows Account does anonymous Web Site access use by default?

Answers:

  1. Administrator
  2. IUSER_MachineName (where the MachineName is the actual computer name)
  3. ASPNET
  4. Guest

52. Which of the following can one use to detect the user’s current language?

Answers:

  1. Examining the UserLanguages property of the current Request object.
  2. Examining the CurrentCulture property of the current Request object.
  3. Examining the Language property of the current Page object.

53. Which of the following are included in the advantages of Lambda Expressions over Anonymous methods?

Answers:

  1. More concise syntax
  2. The types for a Lambda Expression may be omitted
  3. The body of an Anonymous method can not be an expression
  4. Lambda Expressions permit deferred type inference, that anonymous methods do not
  5. All of the above

54. Which of the following is/are true regarding the use of Authentication to control access to the HTML file (.htm or .html)?

Answers:

  1. ASP.NET authentication handles these by default in a manner equivalent to .aspx pages
  2. ASP.NET authentication can be associated with these extensions using aspnet_isapi.dll in IIS 6.0, for the appropriate directory
  3. ASP.NET authentication cannot be used for this purpose

55. Which of the following are true about Nullable types?

Answers:

  1. A Nullable type is a reference type.
  2. An implicit conversion exists from any non-nullable value type to a nullable form of that type.
  3. A predefined conversion from the nullable type S? to the nullable type T? exists if there is a predefined conversion from the non-nullable type S to the non-nullable type T

56. The default number of threads per processor in the System.Threading.ThreadPool class under version 3.5 of the Framwork is:

Answers:

  1. 1
  2. 25
  3. 250
  4. 100
  5. 500

57. Where should information about a control created at design time be stored?

Answers:

  1. ApplicationState
  2. SessionState
  3. ViewState
  4. None of the above

58. Given the code below, which items will cause a compilation error?

static void F1(params int [] y)
{
}

static void Sample()
{
int [] j = new Int32[3];
List k = new List();
// ANSWER GOES HERE
}

Answers:

  1. F1(j);
  2. F1(k);
  3. F1(1, 2, 3);
  4. F1(new [] {1,2,3})
  5. None of the above

59. In which of the following events, the final changes to the contents of the page or its controls could be made.

Answers:

  • Load
  • LoadComplete
  • PreRender
  • Init

60. Which of the following is used to remove a cookie from a client machine?

Answers:

  • Remove the cookie from the System.Web.UI.Page.Request.Cookies collection.
  • Remove the cookie from the System.Web.UI.Page.Request.Browser.Cookies collection.
  • Set the Expires property to DateTime.Now for a cookie in the Web.UI.Page.Response.Cookies
  • Remove the cookie from the System.Web.UI.Page.Response.Cookies collection.

61. When Windows Communication Foundation is used to develop a Web Service, which of the following are supported?

Answers:

  1. WS-Addressing
  2. WS-MetadataExchange
  3. WS-Security
  4. WS-Atomic Transaction
  5. All of the above

62. To which contract is the SessionMode property to disallow, require, or permit applied when Windows Communication Foundation is used?

Answers:

  1. ServiceContract
  2. OperationContract
  3. DataContract
  4. MessageContract

63. Via which of the following is ViewState maintained by default?

Answers:

  1. A hidden variable within the page that is included with each round tip.
  2. A cookie which resides on the client�s computer
  3. A server side in-process memory cache
  4. Instance member variables of the Page class

64. Which of the following are true about Extension methods.

Answers:

  1. They can be declared either static or instance members
  2. They must be declared in the same assembly (but may be in different source files)
  3. Extension methods can be used to override existing instance methods
  4. Extension methods with the same signature for the same class may be declared in multiple namespaces without causing compilation errors

65. In order to use the AJAX AuthenticationService class, which of the following must be true?

Answers:

  1. It must be enabled in the web.config of the ASP.Net application.
  2. Forms Authentication must be enabled in the web.config of the ASP.Net Application
  3. Cookies must be enabled in the browser
  4. A redirection url must be supplied for successful login.

2,173 total views, 4 views today

Upwork .Net Technology

C# Test 2016

Published by:

1. Which of the following define the rules for .NET Languages?

Answers:

  1. GAC
  2. CLS
  3. CLI
  4. CTS
  5. CLR
  6. JIT

2. What is the syntax required to load and use a normal unmanaged windows DLL (e.g. kernel32.DLL) in a managed .NET C# code?

Answers:

  1. Assembly.Load(”Kernel32.DLL”)
  2. LoadLibrary(”Kernel32.DLL”)
  3. [DllImport(”kernel32”, SetLastError=true)]
  4. Unmanaged DLLs cannot be used in a managed .NET application.

3. Suppose there is a List of type Person with a property of LastName(string) and PopulateList is a function which returns a Generic List of type Person:
List<Person> people = PopulateList();

What does the statement below do?
people.Sort((x, y) => string.Compare(x.LastName, y.LastName));

Answers:

  1. It will return a newly created sorted List.
  2. It will throw a compiler error.
  3. It will sort the string in place.
  4. It will throw InvalidOperationException at runtime.

4. Which of the following will correctly remove duplicates from a List<T>?

Answers:

  1. Int32 index = 0; while (index < list.Count + 1) { if (list[index] == list[index + 1]) list.RemoveAt(index); else index–; }
  2. List<T> withDupes = LoadSomeData(); List<T> noDupes = new List<T>(new HashSet<T>(withDupes)); withDupes.AddRange(noDupes);
  3. List<T> withDupes = LoadSomeData(); List<T> noDupes = withDupes.Distinct().ToList();
  4. List<T> withDupes = LoadSomeData(); var hs = new HashSet<T>(withDupes); withDupes.All( x => hs.Add(x) );

5. Is it possible to define custom Exception classes in C#?

Answers:

  1. Yes
  2. Yes, but they have to be derived from System.Exception class
  3. Yes, but they have to be derived from System.Object class
  4. No

6. Which type of class members are associated with the class itself rather than the objects of the class?

Answers:

  1. Public
  2. Protected
  3. Private
  4. Static

7. What is the output of the following code?

class Test
{
static void Main() {
string myString = “1 2 3 4 5”
myString = Regex.Replace(myString, @”s+”, ” “);
System.Console.WriteLine(myString);
}

Answers:

  1. 12345
  2. 1 2 3 4 5
  3. 54321
  4. 5 4 3 2 1

8. Which of the following will block the current thread for a specified number of milliseconds?

Answers:

  1. System.Threading.Thread.Sleep(50);
  2. System.Threading.Thread.SpinWait(50);
  3. System.Threading.Thread.Yield();
  4. None of these.

9. What is the problem with the following function, which is supposed to convert a Stream into byte array?
public static byte[] ReadFully(Stream input)
{
using (MemoryStream ms = new MemoryStream())
{
input.CopyTo(ms);
return ms.ToArray();
}
}

Answers:

  1. It will work only in .NET Framework 4 or above, as the CopyTo function of the memory stream is available only in .NET Framework 4 or later versions.
  2. It will work only in .NET Framework 3.5 or below, as the CopyTo function of the memory stream is available only in .NET Framework 3.5 or earlier versions.
  3. It will work in all versions of the .NET framework.
  4. None of these.

10. Which of the following functions are used to wait for a thread to terminate?

Answers:

  1. Wait()
  2. Terminate()
  3. Join()
  4. Abort()

11. _____________ helped overcome the DLL conflict faced by the C# language versions prior to .NET.

Answers:

  1. CLR
  2. JIT
  3. CTS
  4. GAC
  5. Satellite Assemblies
  6. All of these

12. What is the benefit of using a finally{} block with a try-catch statement in C#?

Answers:

  1. The finally block is always executed before the thread is aborted.
  2. The finally block is never executed before the thread is aborted.
  3. The finally block is never executed after the thread is aborted.
  4. The finally block is always executed before the thread is started.

13. In which of the following namespaces is the Assembly class defined?

Answers:

  1. System.Assembly
  2. System.Reflection
  3. System.Collections
  4. System.Object

14. Which of the following statements is true regarding predicate delegates in C#?

Answers:

  1. Predicate delegates are used for filtering arrays.
  2. Predicate delegates are references to functions that return true or false.
  3. Predicate delegates are only used in System.Array and System.Collections.Generic.List classes.
  4. Predicate delegates are only used in ConvertAll and ForEach methods.

15. Working with a list of Employees:
List<Employee> lstEmployees = new List<Employee>
{
new Employee{Name=”Harry”,Age=15},
new Employee{Name=”Peter”,Age=22},
new Employee{Name=”John”,Age=45},
new Employee{Name=”Harry”,Age=15},
new Employee{Name=”Peter”,Age=22},
new Employee{Name=”John”,Age=45},

};

It is required to filter out employees having distinct names.
Which one of the following options cannot be used?

Answers:

  1. public class Employee { public int Age { get; set; } public string Name { get; set; } public override bool Equals(object obj) { return this.Name.Equals(((Employee)obj).Name); } public override int GetHashCode() { return this.Name.GetHashCode(); } } List<Employee> distinctEmployeesByName = lstEmployees.Distinct().ToList();
  2. public class Employee { public int Age { get; set; } public string Name { get; set; } } public class EmployeeEquityComparable : IEqualityComparer<Employee> { #region IEqualityComparer<Employee> Members public bool Equals(Employee x, Employee y) { return x.Name.Equals(y.Name); } public int GetHashCode(Employee obj) { return obj.Name.GetHashCode(); } #endregion } List<Employee> distinctEmployeesByName = lstEmployees.Distinct(new EmployeeEquityComparable()).ToList();
  3. public class Employee:IEqualityComparer<Employee> { public int Age { get; set; } public string Name { get; set; } #region IEqualityComparer<Employee> Members public bool Equals(Employee x, Employee y) { return x.Name.Equals(y.Name); } public int GetHashCode(Employee obj) { return obj.Name.GetHashCode(); } #endregion } List<Employee> distinctEmployeesByName = lstEmployees.Distinct().ToList();
  4. public class Employee { public int Age { get; set; } public string Name { get; set; } } List<Employee> distinctEmployeesByName = (from emp in lstEmployees group emp by emp.Name into gemp select gemp.First()).ToList();

16. What are the benefits of using the ExpandoObject class over a using dictionary?

Answers:

  1. It offers easier data binding from XAML.
  2. It’s interoperable with dynamic languages, which will be expecting DLR properties rather than dictionary entries.
  3. WPF data binding will understand dynamic properties, so WPF controls can bind to an ExpandoObject more readily than a dictionary.
  4. ExpandoObject can help in creating complex hierarchical objects. ExpandoObject implements the INotifyPropertyChanged interface, which gives more control over properties than a dictionary.

17. What will be the output of the following Main program in a C# console application (Assume required namespaces are included):

static void Main(string[] args)
{
int @int = 15;
Console.WriteLine(@int);
Console.ReadLine();
}

Answers:

  1. 15
  2. It will throw a compilation error.
  3. It will throw an error at runtime.
  4. @15

18. What is the purpose of the catch block in the following code?

try {
// Code that might throw exceptions of different types
}

catch {
// Code goes here
}

Answers:

  1. Only errors of type std::unexpected are caught here.
  2. Other code exceptions are caught.
  3. This catch block must be the first one in a series of catch blocks that may or may not be followed.
  4. This catch block can be the last one in a series of catch blocks to handle any exception which is not handled by the preceding catch blocks, each of which handles an exception of a particular type.
  5. No errors are caught in this try block (they are all passed to the next closest catch).
  6. None of these.

19. Which of the following is true about friend functions in C#?

Answers:

  1. Friend functions violate the concept of OOPS.
  2. Friend functions should not be used.
  3. Friend functions enhance the concept of OOPS if used properly.
  4. Friend functions are not available in C#.

20. Which of the following statements is true about the code below?

string[] lines = theText.Split(new string[] { Environment.NewLine }, StringSplitOptions.None);

Answers:

  1. It splits the string variable on a system line break.
  2. It splits the string variable on a ‘rn’ line break.
  3. It splits the string variable on a system line break, while preserving the empty lines.
  4. It splits the string variable on a system line break, while removing the empty lines.

21. Consider the following code:

string s1 = “Old Value”;
string s2 = s1;
s1 = “New Value”;
Console.WriteLine(s2);

What will be the output printed, and why?

Answers:

  1. “New Value”, because string is a reference type.
  2. “Old Value”, because string is a value type.
  3. “New Value”, because string is a value type.
  4. “Old Value”, because string is a reference type.
  5. “Old Value”, because string is a reference type which is treated as a special case by the assignment operator.

22. What will be the output if in a WinForms application, the following code is executed in the Load event of a form? Assume this form has lblMessage as a Label Control.

private void Form1_Load(object sender, EventArgs e)
{
try
{
ThreadPool.QueueUserWorkItem(ShowMessage,null);
}
catch (Exception ex)
{
}
}

private void ShowMessage(object obj)
{
try
{
lblMessage.Text = “Hello from Thread Pool”;
}
catch (Exception ex)
{
}
}

Answers:

  1. lblMessage.Text will be set to “Hello from Thread Pool”.
  2. An InvalidOperationException will be thrown for the function ShowMessage as the UI can be updated only from the UI thread.
  3. Behavior will vary depending on the form loaded.
  4. None of these.

23. What are Satellite assemblies in C# .NET?

Answers:

  1. Additional assemblies that are used only by the main C# application
  2. User control assemblies used by the C# application
  3. Assemblies that contain only resource information and no code
  4. Assemblies that contain only code and no resource information

24. Where does a C# assembly store the information regarding the other external dependencies, such as satellite assemblies, global assemblies etc, and their versions so that they can be loaded correctly when the assembly is executed?

Answers:

  1. In the embedded resources of the assembly
  2. In the manifest of the assembly
  3. In the MSIL of the assembly
  4. In the Windows registry database
  5. None of these

25. Which of the following will output the string below?
“ttttt”

Answers:

  1. private string Tabs(uint numTabs) { IEnumerable<string> tabs = Enumerable.Repeat(“t”, numTabs); return (numTabs > 0) ? tabs.Aggregate((sum, next) => sum + next) : “”; }
  2. private string Tabs(uint numTabs) { StringBuilder sb = new StringBuilder(); for (uint i = 0; i <= numTabs; i++) { sb.Append(“t”); } return sb.ToString(); }
  3. private string Tabs(uint numTabs) { string output = “”; for (uint i = 0; i <= numTabs; i++) { output += ‘t’; } return output; }
  4. private string Tabs(uint numTabs) { String output = new String(‘t’, numTabs); return output; }

26. Complete the following sentence:

In C#, exception handling should be used…

Answers:

  1. to handle the occurrence of unusual or unanticipated program events
  2. to redirect the programs normal flow of control
  3. in cases of potential logic or user input errors
  4. in case of overflow of an array boundary

27. The global assembly cache:

Answers:

  1. Can store two DLL files with the same name
  2. Can store two DLL files with the same name, but different versions
  3. Can store two DLL files with the same name and same version
  4. Cannot store DLL files with the same name

28. Which statements will give the path where the executing assembly is currently located?

Answers:

  1. System.Reflection.Assembly.GetExecutingAssembly().CodeBase;
  2. System.Reflection.Assembly.GetExecutingAssembly().Location;
  3. AppDomain.CurrentDomain.BaseDirectory;
  4. None of these

29. In C#, can global functions that are not associated with a particular class be defined?

Answers:

  1. Yes
  2. Yes, but they have to be marked with the keyword static.
  3. Yes, but they have to be marked with the keyword internal.
  4. No

30. Which of the following code snippets will call a generic method when the type parameter is not known at compile time?

Answers:

  1. var name = InvokeMemberName.Create; Impromptu.InvokeMemberAction(this, name(“GenericMethod”, new[]{myType}));
  2. MethodInfo method = typeof(Sample).GetMethod(“GenericMethod”); MethodInfo generic = method.MakeGenericMethod(myType); generic.Invoke(this, null);
  3. Action<> GenMethod = GenericMethod< myType >; MethodInfo method = this.GetType().GetMethod(GenMethod.Method.Name); MethodInfo generic = method.MakeGenericMethod(myType); generic.Invoke(this, null);
  4. Action<> GenMethod = GenericMethod< myType >; MethodInfo method = this.GetType().GetMethod(“GenericMethod”); MethodInfo generic = method.MakeGenericMethod(myType); generic.Invoke(this, null);

31. Which of the following is true for CLR?

Answers:

  1. It is an interoperation between managed code, COM objects, and pre-existing DLL’s (unmanaged code and data).
  2. It is a software Output Unit of Deployment and a unit of versioning that contains MSIL code.
  3. It is the primary building block of a .NET Framework application and a collection of functionality that is built, versioned, and deployed as a single implementation unit.
  4. All of these.

32. In the sample code given below, which of the data members are accessible from class Y?

class X {
private int i;
protected float f;
public char c;
}

class Y : X { }

Answers:

  1. c
  2. f
  3. i
  4. All of these

33. If i == 0, why is (i += i++) == 0 in C#?

Answers:

  1. //source code i += i++; //abstract syntax tree += / i i (post) ++
  2. // source code i += i++; //abstract syntax tree += / i ++ (post) i First, i++ returns 0. Then i is incremented by 1. Lastly i is set to the initial value of i which is 0 plus the value i++ returned, which is zero too. 0 + 0 = 0.
  3. int i = 0; i = i + i; i + 1;
  4. int ++(ref int i) { int c = i; i = i + i; return c;}

34. Performance-wise, which of the following is the most efficient way to calculate the sum of integers stored in an object array?

Answers:

  1. int FindSum(object[] values) { int sum = 0; foreach (object o in values) { if (o is int) { int x = (int) o; sum += x; } } return sum; }
  2. int FindSum (object[] values) { int sum = 0; foreach (object o in values) { int? x = o as int?; if (x.HasValue) { sum += x.Value; } } return sum; }
  3. int FindSum (object[] values) { int sum = values.OfType<int>().Sum(); return sum; }
  4. int FindSum (object[] values) { int sum = 0; foreach (object o in values) { if (o is int) { int x = Convert.ToInt32(o); sum += x; } } return sum; }

35. Consider the following code block:

public class Person
{
public string GetAge()
{
lock (this)
{
// Code to get Age of this person object.
}
}
}

Which of the following statements is true?

Answers:

  1. lock(this) actually modifies the object passed as a parameter, and in some way makes it read-only or inaccessible.
  2. lock(this) can be problematic if the instance can be accessed publicly, because code beyond one’s control may lock on the object as well. This could create deadlock situations where two or more threads wait for the release of the same object.
  3. lock(this) marks current object as a critical section by obtaining the mutual-exclusion lock for a given object, all private fields of the object become read-only.
  4. Implement locking using current application instance or some private variable is absolutely the same and does not produce any synchronization issue, either technique can be used interchangeably.

36. The ___________ namespace is not defined in the .NET class library.

Answers:

  1. System
  2. System.CodeDom
  3. System.IO
  4. System.Thread
  5. System.Text

37. Which of the following is true about constructors and member functions?

Answers:

  1. A constructor can return values, but a member function cannot.
  2. A member function can declare and define values, but a constructor cannot.
  3. A member function can return values, but a constructor cannot.
  4. All of these.

38. Which of the following language code is not ‘managed’ by default in .NET framework?

Answers:

  1. Visual Basic
  2. C#
  3. C++
  4. Jscript

39. There is a class that has a public int counter field that is accessed by multiple threads. This int is only incremented or decremented. To increment this field, three thread-safe approaches are mentioned below:

A) lock(this.locker) this.counter++;
B) Interlocked.Increment(ref this.counter);
C) Change the access modifier of counter to public volatile

Which statement is incorrect with regards to these approaches?

Answers:

  1. All 3 are equivalent and can be used interchangeably.
  2. Though A is safe to do, it prevents any other threads from executing any other code which is guarded by locker.
  3. B is the best approach as it effectively does the read, increment, and write in ‘one hit’ which can’t be interrupted.
  4. C on it’s own isn’t actually safe at all. The point of volatile is that multiple threads running on multiple CPU’s can, and will, cache data and re-order instructions.

40. What will happen if the following code is compiled in .NET 4 or above (Assume required namespaces are included)?

public class var { }
public class main
{
public static void main(string[] args)
{
var testVar = new var();
}
}

Answers:

  1. This code will not compile, as var is a reserved keyword, so it can not be used as a class name.
  2. This code will compile, as var is merely a contextual keyword and it is used to provide a specific meaning in the code, so it will cause no problems.
  3. This code will not compile, as a new object cannot be created like var testVar = new var();
  4. None of these.

41. Which object oriented term is related to protecting data from access by unauthorized functions?

Answers:

  1. Inheritance
  2. Data hiding
  3. Polymorphism
  4. Operator overloading
  5. Abstraction

42. One of the ternary operators provided in C# is:

Answers:

  1. *
  2. ::
  3. &
  4. ?:
  5. &lt&lt

43. What type of code is written to avail the services provided by Common Language Runtime?

Answers:

  1. MSIL
  2. Unmanaged code
  3. Managed Code
  4. C#/VB/JS

44. Asynchronous execution is supported in ADO.NET 2.0 for?

Answers:

  1. ExecuteReader
  2. ExecuteScalar
  3. ExecuteNonQuery
  4. All of these

45. The .NET Framework consists of:

Answers:

  1. The Common Language Runtime
  2. A set of class libraries
  3. The Common Language Runtime and a set of class libraries

46. An enum is defined in a program as follows:
[Flags]
public enum Permissions
{
None = 0,
Read = 1,
Write = 2,
Delete = 4
}

What will be the output of the following Main program (which has access to the enum defined above) in this C# console application (Assume required namespaces are included) :

static void Main(string[] args)
{
var permissions = Permissions.Read | Permissions.Write;
if ((permissions & Permissions.Write) == Permissions.Write)
{
Console.WriteLine(“Write”);
}
if ((permissions & Permissions.Delete) == Permissions.Delete)
{
Console.WriteLine(“Delete”);
}
if ((permissions & Permissions.Read) == Permissions.Read)
{
Console.WriteLine(“Read”);
}
Console.ReadLine();
}

Answers:

  1. Write Delete Read
  2. Write Delete
  3. Delete
  4. Write Read

47. Which of the following keywords prevents a class from being overridden further?

Answers:

  1. abstract
  2. sealed
  3. final
    oot
  4. internal

48. Suppose a class is declared as a protected internal:
protected internal class A
{
}

Which statement is correct with regards to its accessibility?

Answers:

  1. This class can be accessed by code in the same assembly, or by any derived class in another assembly.
  2. This class can only be accessed by code which is in the same assembly.
  3. This class can only be accessed by code which is in the derived class (i.e. classes derived from Class A) and which are in the same assembly.
  4. This class can be accessed by any code whether in the same assembly or not.

49. Which of the following is the correct way to randomize a generic list of 75 numbers using C#?

Answers:

  1. Random random = new Random(); List<object> products= GetProducts(); products.OrderBy(product => random.Next(products.Count));
  2. Random random = new Random(); List<object> products= GetProducts(); products.Randomize(product => random.Next(products.Count));
  3. Random random = new Random(); List<object> products= GetProducts(); products.Randomize(products.Count);
  4. Random random = new Random(); List<object> products= GetProducts(); products.Reverse(product => random.Next(products.Count));

50. What will be the value of the result variable after these two statements?

int num1 = 10, num2 = 9;

int result = num1 & num2;

Answers:

  1. 1
  2. 8
  3. 9
  4. 10
  5. 11
  6. 109

51. What is the output of the following code:

class CCheck {

public static void Main() {
string str = @”E:\RIL\test.cs”;
Console.WriteLine(str);
}
}

Answers:

  1. “E:\RIL\test.cs”
  2. E:\RIL\test.cs
  3. “E:RILtest.cs”
  4. The compiler will generate an error saying undefined symbol ‘@’.

52. What is the issue with the following function?

public string GetName(int iValue)
{
string sValue = “0”;
switch (iValue)
{
case 1:
sValue = iValue.ToString();
case 2:
sValue = iValue.ToString();
break;
default:
sValue = “-1”;
break;
}
return sValue;
}

Answers:

  1. The code will not compile as there shouldn’t be a break statement in the default case label.
  2. The code will compile but if case 1 is passed as the input parameter to the function, the code for case 2 will also execute (after the code for case 1), and so the wrong value may be returned.
  3. The code will compile and run without any issues.
  4. The code will not compile as there is no break statement in case 1.

53. What will be the output of the following Main program in a C# console application (Assume required namespaces are included):

static void Main(string[] args)
{
for (int i = 0; i < 1; i++)
{
Console.WriteLine(“No Error”);
}
int A = i;
Console.ReadLine();
}

Answers:

  1. No Error
  2. This program will throw a compilation error, “The name ‘i’ does not exist in the current context”.
  3. The program will compile, but throw an error at runtime.
  4. None of these.

54. What is the difference between int and System.Int32 CLR types?

Answers:

  1. int represents a 16-bit integer while System.Int32 represents a 32-bit integer.
  2. int is just an alias for System.Int32, there is no difference between them.
  3. int represents a 64-bit integer while Int32 represents a 32-bit integer.
  4. None of these.

55. What will be the return value if the function fn is called with a value of 50 for the parameter var?

public int fn(int var)
{
int retvar = var – (var / 10 * 5);
return retvar;
}

Answers:

  1. 50
  2. 25
  3. 49
  4. Error message
  5. None of these

56. Which of the following code snippets converts an IEnumerable<string> into a string containing comma separated values?

Answers:

  1. public static string ConvertToString(IEnumerable<T> source) { return new List<T>(source).ToArray(); }
  2. public static string ConvertToString(IEnumerable<T> source) { return string.Join(“,”,source.ToArray()); }
  3. public static string ConvertToString(IEnumerable<T> source) { return source.ToString(); }
  4. public static string ConvertToString(IEnumerable<T> source) { return string.Join(source.ToArray()); }

57. Which of the following is true regarding a null and an empty collection in C#?

Answers:

  1. An empty collection and a null are both objects.
  2. An empty collection and a null both have the same meaning.
  3. Both an empty collection and a null do not refer to any object.
  4. An empty collection is an object while the null keyword is a literal.

58. Which of the following exceptions cannot be thrown by the Delete() function of the FileInfo class (ie. FileInfo.Delete())?

Answers:

  1. IOException
  2. SecurityException
  3. UnauthorizedAccessException
  4. InvalidOperationException

59. Which of the following statements are true regarding the ref and out parameters in C#?

Answers:

  1. A variable that is passed as an out parameter needs to be initialized, but the method using the out parameter does not need to set it to something.
  2. The out parameter can be used to return the values in the same variable passed as a parameter of the method. Any changes made to the parameter will be reflected in the variable.
  3. The ref keyword can only be used on one method parameter.
  4. The ref parameter is considered initially assigned by the callee. As such, the callee is not required to assign to the ref parameter before use. Ref parameters are passed both into and out of a method.

60. What is the difference between the String and StringBuilder class objects with respect to mutability?

Answers:

  1. String objects are mutable, while StringBuilder objects are immutable.
  2. String objects are immutable, while StringBuilder objects are mutable.
  3. There is no difference between them in this context, as both are immutable.
  4. There is no difference between them in this context, as both are mutable.

61. Which of the following code samples will create a comma separated list from IList<string> or IEnumerable<string>?

Answers:

  1. public static T[] ToArray(IEnumerable<T> source) { return new List<T>(source).ToArray(); } IEnumerable<string> strings = …; string[] array = Helpers.ToArray(strings); string joined = string.Join(“,”, strings.ToArray()); string joined = string.Join(“,”, new List<string>(strings).ToArray());
  2. List<string> ls = new List<string>(); ls.Add(“one”); ls.Add(“two”); string type = string.Join(“,”, ls.ToArray());
  3. string commaSeparatedList = input.Aggregate((a, x) => a + “, ” + x)
  4. public static string Join(this IEnumerable<string> source, string separator) { return string.Join(separator, source); }

62. What is the advantage of using IList<T> over List<T>?

Answers:

  1. IList<T> uses reflection, which is the most efficient way to process an object inside memory.
  2. IList<T> implements hashing to store objects in the collection; which produces optimum performance.
  3. Using IList<T> rather than List<T> allows the code to be more flexible. It can replace the implementation with any collection that implements IList<T> without breaking any calling code.
  4. IList<T> only allows immutable types to be stored inside the collection.

63. How can a single instance application be created in C#?

Answers:

  1. System.Threading.SingleInstance can be used to ensure that only one instance of a program can run at a time.
  2. System.Threading.Mutex can be used to ensure that only one instance of a program can run at a time.
  3. Locks can be used to force a C# application to launch a single instance at a time.
  4. C# applications cannot be restricted to a single instance.

64. Which of the following code samples will execute a command-line program in C# and return its STD OUT results?

Answers:

  1. System.Diagnostics.Process pProcess = new System.Diagnostics.Process(); pProcess.StartInfo.FileName = strCommand; pProcess.StartInfo.Arguments = strCommandParameters; pProcess.StartInfo.UseShellExecute = false; pProcess.StartInfo.RedirectStandardOutput = true; pProcess.Start(); string strOutput = pProcess.StandardOutput.ReadToEnd(); pProcess.WaitForExit();
  2. Process p = new Process(); p.StartInfo.UseShellExecute = true p.StartInfo.RedirectStandardOutput = false p.StartInfo.FileName = “YOURBATCHFILE.bat”; p.Start(); string output = p.StandardOutput.ReadToEnd(); p.WaitForExit();
  3. System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo(“program_to_call.exe”); psi.RedirectStandardOutput = true; psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; psi.UseShellExecute = false; System.Diagnostics.Process proc System.Diagnostics.Process.Start(psi);; System.IO.StreamReader myOutput = proc.StandardOutput; proc.WaitForExit(2000); if (proc.HasExited) { string output = myOutput.ReadToEnd(); }
  4. System.Diagnostics.Process pProcess = new System.Diagnostics.Process(); pProcess.StartInfo.FileName = strCommand; pProcess.StartInfo.Arguments = strCommandParameters; pProcess.StartInfo.UseShellExecute = false; pProcess.StartInfo.RedirectStandardOutput = true; pProcess.StartInfo.WorkingDirectory = strWorkingDirectory; pProcess.Start(); string strOutput = pProcess.StandardOutput.ReadToEnd(); pProcess.WaitForExit();

65. What is an Action delegate?

Answers:

  1. An Action is a delegate to a method, that takes zero, one or more input parameters, but does not return anything.
  2. An Action is a delegate to a method, that takes zero, one or more input parameters, but always returns a boolean value.
  3. An Action is a delegate to a method that takes one or more input parameters, but does not return anything.
  4. An Action is a delegate to a method that takes one or more input parameters, but always returns a boolean value.

66. What is the difference between Expression<Func<T>> and Func<T>?

Answers:

  1. There is no difference between the two.
  2. Func<T> denotes a delegate, while Expression<Func<T>> denotes a tree data structure for a lambda expression.
  3. Func<T> denotes a function with parameter of dynamic type, while Expression<Func<T>> denotes a lambda expression.
  4. None of these.

67. Which of the following statements is true about IEnumerable<T>?

Answers:

  1. IEnumerable<T> supports a Size property.
  2. IEnumerable<T> supports a Count() extension.
  3. IEnumerable<T> cannot be casted onto an ICollection<T>.
  4. IEnumerable<T> cannot be casted onto an IList<T>.

68. Which of the following statements is true about the System.Environment.NewLine property?

Answers:

  1. It’s a string containing “n” for non-Unix platforms.
  2. It’s a string containing “n” for Unix platforms.
  3. It’s a string containing “rn” for non-Unix platforms.
  4. It’s a string containing “rn” for Unix platforms.

69. An Interface represents which kind of relationship?

Answers:

  1. IS A
  2. HAS A
  3. CAN DO
  4. None of these

70. Why is it a bad practice to use iteration variables in lambda expressions?

Answers:

  1. Iteration variables can cause problems with accessing a modified closure.
  2. Iteration variables are passed by value, which produces unexpected results.
  3. Iteration variables are passed by reference, which produces unexpected results.
  4. It is perfectly valid to use iteration variables in lambda expressions.

71. Which of the following code samples will check if a file is in use?

Answers:

  1. protected virtual bool IsFileLocked(FileInfo file) { FileStream stream = null; try { stream = file.Open(FileMode.Open, FileAccess.ReadWrite, FileShare.None); } catch (IOException) { return true; } finally { if (stream != null) stream.Close(); } return false; }
  2. try { using (Stream stream = new FileStream(“MyFilename.txt”, FileMode.Open)) { } } catch { }
  3. internal static bool FileOrDirectoryExists(string name) { return (Directory.Exists(name) || File.Exists(name)) }
  4. FileInfo file = new FileInfo(“file.txt”); if (file.Exists) { // TO DO }

72. Which of the following statements is true regarding the code samples below?

A:
try {
// code goes here
} catch (Exception e) {
throw e;
}

B:
try {
// code goes here
} catch (Exception e) {
throw;
}

Answers:

  1. A will lose the call stack trace information. B will preserve the call stack trace information.
  2. A will preserve the call stack trace information. B will lose the call stack trace information.
  3. Both A and B will preserve the call stack trace information.
  4. Both A and B will lose the call stack trace information.

73. Which of the following is the correct way to implement deep copying of an object in C#?

Answers:

  1. By using the System.Runtime.Serialization.Formatters.Binary.BinaryFormatter class.
  2. By using the System.Reflection.DeepCopy class.
  3. By using the DeepCopy() method of Object class.
  4. By using the MemberwiseClone() method of Object class.

74. What will be the output of the following Main program in a C# console application (Assume required namespaces are included)?

static void Main(string[] args)
{
string Invalid = “$am$it$”;
string sResult = Invalid.Trim(new char[]{‘$’});
Console.WriteLine(sResult);
Console.ReadLine();
}

Answers:

  1. amit
  2. am@am$
  3. $am$it$
  4. am$it

75. Which of the following is the correct way to perform a LINQ query on a DataTable object?

Answers:

  1. var results = from myRow in myDataTable where results.Field(“RowNo”) == 1 select results;
  2. var results = from myRow in myDataTable.AsEnumerable() where myRow.Field(“RowNo”) == 1 select myRow;
  3. var results = from myRow in myDataTable.Rows where myRow.Field<int>(“RowNo”) == 1 select myRow;
  4. var results = from myRow in myDataTable.AsEnumerable() where myRow.Field<int>(“RowNo”) == 1 select new { IID= myRow.Field<int>(“IID”), Date = myRow.Field<DateTime>(“Date”), };

76. What is the purpose of the vshost.exe file in Visual Studio?

Answers:

  1. It is used to improve the performance of the Visual Studio debugger.
  2. It is used to improve the performance of Visual Studio plugins.
  3. It is used to improve the performance of the C# compiler.
  4. It is used to load Visual Studio configuration data.

77. Which of the following code snippets for catch shows a better way of handling an exception?

1.
catch (Exception exc)
{
throw exc;
}
2.
catch (Exception exc)
{
throw;
}

Answers:

  1. 1 is better as it maintains the call stack.
  2. 2 is better as it maintains the call stack.
  3. Both are same.
  4. None of these.

78. What will be the value of result after these two statements?

int num1 = 10, num2 = 9;
int result = num1 ^ num2;

Answers:

  1. 1
  2. 8
  3. 9
  4. 10
  5. 3
  6. 1000000000
  7. 109

79. What will be the output of the following Main program in a C# console application (Assume required namespaces are included)?
static void Main(string[] args)
{
string sPrint = String.Format(“{{ My name is bond. }}”);
Console.WriteLine(sPrint);
Console.ReadLine();
}

Answers:

  1. {{ My name is bond. }}
  2. It will throw a compilation error.
  3. { My name is bond. }
  4. It will throw a runtime error.

80. What is the difference between data types “System.String” and “string” in C#?

Answers:

  1. string is a value type, while System.String is a reference type.
  2. There is no difference,string is just an alias of the System.String data type.
  3. string variable is limited to storing alphabetic characters, while System.String does not have any limit.
  4. None of these.

81. Which of the following is the correct code to close all references to the com objects below?

Workbooks books = excel.WorkBooks;
Workbook book = books[1];
Sheets sheets = book.WorkSheets;
Worksheet ws = sheets[1];

Answers:

  1. Marshal.ReleaseComObject(books);
  2. Marshal.FinalReleaseComObject(books);
  3. Marshal.ReleaseComObject(sheets); Marshal.ReleaseComObject(books);
  4. Marshal.ReleaseComObject(sheet); Marshal.ReleaseComObject(sheets); Marshal.ReleaseComObject(book); Marshal.ReleaseComObject(books);

82. Which of the following is the correct way to sort a C# dictionary by value?

Answers:

  1. List<KeyValuePair<string, string>> myList = aDictionary.ToList(); myList.Sort( delegate(KeyValuePair<string, string> firstPair, KeyValuePair<string, string> nextPair) { return firstPair.Value.CompareTo(nextPair.Value); } );
  2. List<KeyValuePair<string, string>> myList = aDictionary.ToList(); myList.Sort((firstPair,nextPair) => { return firstPair.Value.CompareTo(nextPair.Value); } );
  3. foreach (KeyValuePair<string,int> item in keywordCounts.OrderBy(key=> key.Value)) { // do something with item.Key and item.Value }
  4. var ordered = dict.OrderBy(x => x.Value);

5,967 total views, 14 views today

Top 10 popular test answers

Photoshop CS5 Extended Test 2016

Published by:

1. It is possible to avoid Adjustment Layers while working with the Healing Brush tool.

Answers:

  1. True
  2. False

2. What does the Use Global Light option in the Layer Style dialog box do when checked?

Answers:

  1. It indicates the lighting angle that has been used for every style that you added in your document.
  2. It shows the opacity that has been used for every style that you added in your document.
  3. It uses the same lighting angle in every style you add in your document.
  4. It indicates that the same opacity level will be used for every style you add in your document.

3. What do the Horizontal Type Mask Tool and Vertical Type Mask Tool do?

Answers:

  1. These tools create a layer mask when you click on stage to enter the text.
  2. These tools create normal text on screen without creating a new layer.
  3. These tools create a selection of whatever you type without creating a new layer.
  4. These tools do nothing special other than creating a simple type layer.

4. ____________________ is a grid-like mesh on your image that contains handles to distort the content the way you want.

Answers:

  1. Content Aware Scale
  2. Puppet Warp
  3. Mixer Brush
  4. There is no such tool available in Photoshop.

5. You can apply Brush, Eraser and Clone Stamp on vector based layers.

Answers:

  1. True
  2. False

6. How does the “Expansion Field” of Puppet Warp tool work?

Answers:

  1. It lets you expand or contract the outer edge of the mesh by a pixel value.
  2. It turns the mesh on or off.
  3. It lets you determine how deep the warping goes.
  4. It controls the spacing of mesh points.

7. ___________________is a process in which Photoshop responds to your size-change request either by adding or subtracting pixels.

Answers:

  1. Scale Styles
  2. Resampling
  3. Constrain proportions
  4. None of the above

8. Which of the following settings is/are available in the Lighting Effects dialog box?

Answers:

  1. Gloss
  2. Material
  3. Exposure
  4. All of the above

9. What purpose does the area marked in blue in the given image serve?

Answers:

  1. It lets you select between the various options available for workspace.
  2. It lets you select between the screen modes available in Photoshop.
  3. It lets you choose how you want your documents to appear on screen.
  4. None of the Above.

10. __________________filter helps to draw perspective planes or a mesh grid that can be used in editing.

Answers:

  1. Crosshatch
  2. Trace Contour
  3. Vanishing Point
  4. Graphic Pen

11. Bit depth controls the amount of color information that a pixel can hold.

Answers:

  1. True
  2. False

12. It is possible to convert a type layer into a shape layer.

Answers:

  1. True
  2. False

13. _____________ makes the pixels you are painting appear behind the pixels already on that layer, while ________________ makes the pixels you paint transparent in brush panel.

Answers:

  1. Airbrush, Brush Panel
  2. Opacity, Flow
  3. Behind mode, Clear mode
  4. None of the above

14. Which command lets you paste an image inside the selection you have made?

Answers:

  1. Paste Into
  2. Paste In Place
  3. Paste Outside
  4. All of the above

15. How do you use a shape with gradient as a mask as shown in the image above?

Answers:

  1. Mask the object. Select the shape layer and go to the Blending Options. Check Blend Interior Effects as a Group and uncheck Blend Clipped Layers as a Group.
  2. Mask the object. Select the shape layer and go to the Blending Options. Check Blend Clipped Layers as a Group and uncheck Blend Interior Effects as a Group.
  3. Mask the object. Select the shape layer and go to the Blending Options. Check Layer Mask Hide Effects.
  4. Mask the object. Select the shape layer and go to the Blending Options. Check Transparency Shape Layers and uncheck Vector Mask Hide Effects.

16. A gray warning symbol means that you are using a font that is not installed in your system, whereas a yellow warning symbol means that the document you have opened was created in a different version of Photoshop and that the text may get reflowed if you edit it.

Answers:

  1. True
  2. False

17. How do you write around any shape as shown in the image above?

Answers:

  1. Select Type tool>> Mouseover the shape or path and start writing when the cursor shape changes to type cursor with a curved line on it.
  2. Select Type tool>> Choose the Warp text option from the Options bar and choose the shape you want to give the text.
  3. Type the required text and transform it with the help of different transform tools to adjust it according to the shape.
  4. It is not possible to achieve this effect in Photoshop.

18. Which of the following values define the maximum hardness and softness limits of the round brush tip?

Answers:

  1. 50, 75
  2. 0, 50
  3. 0, 100
  4. 50, 100

19. What option in the Character panel will you choose for moving the text away or toward the shape it is bound to?

Answers:

  1. Kerning
  2. Leading
  3. Baseline shift
  4. Tracking

20. What effect will checking the Constrain Proportions option shown above have on the size of an image?

Answers:

  1. It will let you change the width and height of the document independently.
  2. It will fix the width and the height of the document.
  3. It will scale the image proportionally.
  4. It has nothing to do with the size of the document.

21. Using Render filters, you can :

Answers:

  1. sharply define a selection.
  2. create cloud patterns.
  3. remove noise.
  4. geometrically distort an image.

22. Which method of Resample Image gives the lowest image quality?

Answers:

  1. Bicubic Sharper
  2. Bilinear
  3. Nearest Neighbor
  4. Bicubic

23. Which of the following options will you choose if you want to increase or decrease the size of the mask while editing the mask?

Answers:

  1. Density
  2. Apply Mask
  3. Mask Edge
  4. Load selection from mask

24. ____________________is the process of converting vector based layers into pixel based layers.

Answers:

  1. Rasterizing
  2. Masking
  3. Convert to Smart Object
  4. Link layers

25. _________________control how pixels on different layers interact with each other.

Answers:

  1. Gradient Mask
  2. Channels
  3. Layer Blend Modes
  4. Path

26. In the Screen layer blend mode, Photoshop multiplies the opposite of the blend and base colors, making everything very light.

Answers:

  1. True
  2. False

27. Filters can affect multiple layers simultaneously.

Answers:

  1. True
  2. False

28. What do the width and height of the histogram in levels adjustments represents?

Answers:

  1. Brightness, Contrast
  2. Tonal range from darkest to lightest, number of pixels at particular level of brightness
  3. Hue/Saturation, Lightness
  4. None of the above

29. Levels adjustments do NOT change the intensity levels of your shadows, midtones, and highlights.

Answers:

  1. True
  2. False

30. Anti-aliasing allows you to smoothen the edges of a selection as well as smoothen text.

Answers:

  1. True
  2. False

31. Smooth and Corner are two kinds of anchor points in Photoshop.

Answers:

  1. True
  2. False

32. What option will you choose if you want to merge a selected layer with the layer lying immediately below it?

Answers:

  1. Merge linked
  2. Merge selected
  3. Merge down
  4. Merge visible

33. What are the names of the tools marked in red in the image above?

Answers:

  1. New path, Delete path
  2. Load path as selection, Make work path from selection
  3. Fill path with foreground color, Stroke path with brush
  4. None of the above

34. Revert command reverts the document to its most recent saved state.

Answers:

  1. True
  2. False

35. The Fractional widths command in the Character panel rounds character widths to the nearest part of a pixel instead of the normal whole pixel.

Answers:

  1. True
  2. False

36. Duotone refers to an image that’s made from two ink colors.

Answers:

  1. True
  2. False

37. Which layer blend mode lightens the image by decreasing its contrast?

Answers:

  1. Overlay
  2. Color Burn
  3. Vivid Light
  4. Color Dodge

38. Which option in Stamp tool will you select if you want to clone all the layers simultaneously?

Answers:

  1. Opacity
  2. Flow
  3. Sample All Layers
  4. Mode

39. Alpha Channels are basically grayscale representations of saved selections.

Answers:

  1. True
  2. False

40. ________________ does NOT affect the original quality and size even if you resize the object.

Answers:

  1. Transform
  2. Clipping Mask
  3. Smart Object
  4. Rasterizing

41. Images in which mode are called 1-bit images?

Answers:

  1. CMYK color mode
  2. RGB color mode
  3. Bitmap color mode
  4. High Dynamic Range

42. What are anchor points?

Answers:

  1. They define the ending points of a path and makes it closed path.
  2. They define the starting point of any shape.
  3. They are the control points which gives shape to each segment of a line.
  4. They just define the outer boundary of any shape.

43. Channels contain all the color information of a Photoshop document.

Answers:

  1. True
  2. False

44. You can define the area that you want to crop out of any image using the Crop tool.

Answers:

  1. True
  2. False

45. Which of the following action sequences will make the above given dialog box appear on screen?

Answers:

  1. File>Scripts>Load Images into Stack
  2. File>Import>Video Frames to Layers
  3. File>Automate>Photomerge
  4. File>Scripts>Image Processor

46. Content Aware Scale tool can work on the locked background layer.

Answers:

  1. True
  2. False

47. Which of the following are image sharpening techniques available in Photoshop?

Answers:

  1. High Pass
  2. Unsharp Mask
  3. Smart Sharpen
  4. All of the above

48. The Mode pop-up menu of Puppet warp tells Photoshop how stretchable you want the mesh to be.

Answers:

  1. True
  2. False

49. ____________________ helps change the spacing between all letters in a word by the same amount.

Answers:

  1. Horizontal scale
  2. Leading
  3. Kerning
  4. Tracking

50. What is the subtractive color system used for?

Answers:

  1. For printing colors
  2. For onscreen colors
  3. Both a and b
  4. None of the above

51. What will be the default blending mode of a layer group?

Answers:

  1. Hard Mix
  2. Pass Through
  3. Dissolve
  4. Multiply

52. Which among the following is measured in terms of pixels per inch in any Photoshop document?

Answers:

  1. Bit
  2. Bit depth
  3. Pixel Aspect Ratio
  4. Resolution

53. Which tool of Photoshop makes the image shown above appear on screen?

Answers:

  1. Levels
  2. Curves
  3. Vibrance
  4. Threshold

54. Proximity Match option in Spot Healing Brush tells it to use pixels just outside the edge of your cursor to fix spots.

Answers:

  1. True
  2. False

55. The Path Selection tool lets you select individual nodes on the path, whereas the Direct Selection tool lets you the select path as a whole.

Answers:

  1. True
  2. False

56. With which options can you get the effects shown in the image above?

Answers:

  1. Drop Shadow, Inner Shadow, Bevel and Emboss, Pattern Overlay
  2. Inner Shadow, Bevel and Emboss, Satin, Stroke
  3. Bevel and Emboss, Satin, Stroke, Gradient Overlay
  4. Outer Glow, Color Overlay, Stroke, Inner Glow

57. __________________ appears when you check the Tint checkbox, as shown in the image above, in the Adjustments panel>> Black & White layer.

Answers:

  1. Sepia tone
  2. Fake duotone
  3. Hue/Saturation
  4. Color Balance

58. What file formats are available to you when you save a file using the Save for Web & Devices dialog box?

Answers:

  1. JPEG
  2. PNG-8
  3. WBMP
  4. All of the above

59. How many drawing modes are available in Photoshop?

Answers:

  1. 3
  2. 5
  3. 4
  4. 2

60. How many channels do lab colors have?

Answers:

  1. 5
  2. 2
  3. 4
  4. 3

61. Which of the following options are contained in the Brush dialog box?

Answers:

  1. Scattering
  2. Color Dynamics
  3. Transfer
  4. All of the above

62. Image Processor option is used for resizing the Images in masses.

Answers:

  1. True
  2. False

63. Onscreen images are called ___________________because they are made up of red, blue, green light.

Answers:

  1. Colored Images
  2. Vector Images
  3. Raster Images
  4. Composite Images

64. What does the Baseline option in the Curves Display Options dialog box do?

Answers:

  1. It lets you see a separate curve for each channel in your document.
  2. It tells Photoshop to display the original curve as a straight line.
  3. It determines whether Photoshop displays a light-gray version of your image’s histogram behind the grid.
  4. It makes Photoshop display horizontal and vertical “helper” lines when you drag a point to help you align it properly.

65. __________________ is/are available only if you have an alpha channel selected.

Answers:

  1. Channel Options
  2. Split Channels
  3. Panel Options
  4. Spot Channel

66. Which option allows you to change the Background layer’s appearance when part of your image is transparent?

Answers:

  1. Opacity
  2. Transparency
  3. Performance
  4. Interface

67. Which of the given image(s) belongs to the red channel if the source image is in RGB mode?
Answers:

  1. First
  2. Second
  3. Third
  4. None of the above

68. How many drawing modes are available in Photoshop, when you work with shape or pen tools?

Answers:

  1. 3
  2. 5
  3. 4
  4. 2

69. Which of the following values define the maximum softness and hardness limits of the round brush tip?

Answers:

  1. 50, 75
  2. 0, 50
  3. 0, 100
  4. 50, 100

70. Which “layer blend mode” lightens the image by increasing its contrast?

Answers:

  1. Overlay
  2. Color Burn
  3. Vivid Light
  4. Color Dodge

9,157 total views, 21 views today

Top 10 popular test answers

Android Programming Test 2016

Published by:

1. Which of the following are UI elements that you can use in a window in an Android application?

Answers:

  1. TextBox
  2. TextView
  3. TextField
  4. TextElement
  5. EditText
  6. RichText

2. What is the correct way to fix if checking the status of the GPS_PROVIDER throws SecurityException?

Answers:

  1. request permission for ACCESS_COARSE_LOCATION
  2. request permission for ACCESS_FINE_LOCATION
  3. request permission for INSTALL_LOCATION_PROVIDER
  4. None of the above

3. Which of the following is not Content Provider?

Answers:

  1. Contacts
  2. Contacts
  3. Shared Preferences
  4. MediaStore
  5. Bookmarks
  6. Settings

4. Which of the following statements are correct with regards to signing applications?

a) All applications must be signed.
b) No certificate authority is needed.
c) When releasing application special debug key that is created by the Android SDK build tools can be used.

Answers:

  1. a) and b) are true
  2. a) and c) are true
  3. b) and c) are true
  4. all statements are true

5. What does the following code do?

SensorManager mgr = (SensorManager) getSystemService(SENSOR_SERVICE);
List<Sensor> sensors = mgr.getSensorList(Sensor.TYPE_ALL);
for (Sensor sensor : sensors) {
System.out.println(“”+sensor.getName());
}

Answers:

  1. prints names of all available sensors in device
  2. prints names of all available sensor types in device
  3. prints names of all sensors which are not available
  4. none of above

6. What does the following code do?

try {
String token = GoogleAuthUtil.getToken(this, email, “https://www.googleapis.com/auth/devstorage.read_only”);
System.out.println(token);
} catch (IOException e) {
System.out.println(“IOException”);
} catch (UserRecoverableAuthException e) {
System.out.println(“UserRecoverableAuthException”);
} catch (GoogleAuthException e) {
System.out.println(“GoogleAuthException”);
}

Answers:

  1. prints token
  2. prints IOException
  3. prints UserRecoverableAuthException
  4. prints GoogleAuthException

7. Which of the following is correct to use for data transfer regularly and efficiently, but not instantaneously?

Answers:

  1. AsyncTask
  2. IntentService
  3. Sync adapters
  4. All of these

8. What is the ListActivity class used for?

Answers:

  1. Create a view to display a list of items from a data source.
  2. List all the activities currently running on the Android device.
  3. List all the activites that are installed on the Android device.
  4. List the activities whose IntentFilters match with a particular Intent type.

9. Using a content provider, which of the following operations are able to perform?
a) create
b) read
c) update
d) delete

Answers:

  1. a, b and c
  2. b, c and d
  3. all of these
  4. none of these

10. Which of the following widgets helps to embed images in activities?

Answers:

  1. ImageView
  2. ImageButton
  3. both of above
  4. none of these

11. What is the best way of opening camera as sub-activity?

Answers:

  1. Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivity(takePictureIntent);
  2. Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (takePictureIntent.resolveActivity(getPackageManager()) != null) { startActivityForResult(takePictureIntent, 1); }
  3. Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(takePictureIntent, 1);
  4. Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (takePictureIntent.resolveActivity(getPackageManager()) != null) { startActivityForResult(takePictureIntent, -1); }

12. What is the correct way to restrict app visibility on Google Play to devices that have a camera?

Answers:

  1. <uses-feature android:name=”android.hardware.camera”/>
  2. <uses-feature android:name=”android.hardware.camera” android:required=”true” />
  3. <uses-feature android:name=”android.hardware.camera.front” android:required=”true” />
  4. <uses-permission android:name=”android.permission.CAMERA”/>

13. Which of the following sensors is only hardware-based?

Answers:

  1. linear acceleration sensor
  2. gravity sensor
  3. rotation vector sensor
  4. accelerometer sensor

14. Which of the following formats is not supported in Android?

Answers:

  1. MP4
  2. MPEG
  3. AVI
  4. MIDI

15. Which of the following permissions and configurations must be added in manifest file for implementing GCM Client?

A) com.google.android.c2dm.permission.RECEIVE
B) android.permission.INTERNET
C) android.permission.GET_ACCOUNTS
D) android.permission.WAKE_LOCK
E) applicationPackage + “.permission.C2D_MESSAGE”
F) A receiver for com.google.android.c2dm.intent.RECEIVE, with the category set as applicationPackage. The receiver should require the com.google.android.c2dm.SEND permission

Answers:

  1. A, B, C and D
  2. C, D, E and F
  3. A, B, E and F
  4. all of these

16. Which of the following permissons is needed to perform the network operations through internet?
a) INTERNET
b) ACCESS_NETWORK_STATE

Answers:

  1. a
  2. b
  3. both
  4. none

17. Consider the following snippet of code:

@Override
protected void onStop
{
Super.onStop();
SharedPreferences setting = getSharedPreferences(“MyPrefs”, 0);
SharedPreferences.Editor editor = settings.edit();
editor.putBoolean(“MyBool”, true);

<some more code here>
}

Which of the following should be used <some more code here>?

Answers:

  1. editor.save(); editor.close();
  2. editor.save(); editor.finish();
  3. editor.commit();
  4. editor.save();
  5. editor.close();
  6. editor.finish();

18. What does the following statement define?

It provides query(), insert(), update(), and delete() methods for accessing data from a content provider and invokes identically-named methods on an instance of a concrete content provider.

Answers:

  1. CursorLoader
  2. ContentResolver
  3. ContentProvider
  4. Loader

19. What is the advantage of using AsyncTaskLoader instead of AsyncTask?

Answers:

  1. a bit easier to work with
  2. the possibility easily update progress bar
  3. no comparison, because it implements completely different functionality
  4. less work with the configuration of applicationM

20. What does the following code do?

public boolean isOnline() {
ConnectivityManager connMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
return (networkInfo != null && networkInfo.isConnected());
}

Answers:

  1. checking Network connection.
  2. checking only WIFI network connectivity.
  3. checking only Bluetooth data connection.
  4. checking only Ethernet data connection

21. Which of the following statements are correct with regards to running of the Sync Adapter?

A) Running sync adapter in response to a user request.
B) Running sync adapter periodically by setting a period of time to wait between runs, or by running it at certain times of the day, or both.

Answers:

  1. Statement A is true, while Statement B is false.
  2. Statement B is true, while Statement A is false.
  3. Both statements are true.
  4. Both statements are false.

22. Which of the following statements are correct with regards to calling place GoogleAuthUtil.getToken()?
A) call getToken() on the UI thread
B) call getToken() on AsyncTask

Answers:

  1. Statement A is true, while Statement B is false.
  2. Statement B is true, while Statement A is false.
  3. Both statements are true.
  4. Both statements are false.

23. Which of the following protocols are provided by Google for GCM Connection Servers?
A) HTTP
B) XMPP
C) SOAP
D) RMI

Answers:

  1. A and B
  2. A, B, C
  3. C, D
  4. all of these

24. Which of the following 4 classes does not relate to others?

ApplicationInfo, SyncInfo, ActivityInfo, PackageInfo

Answers:

  1. ApplicationInfo
  2. SyncInfo
  3. ActivityInfo
  4. PackageInfo

25. Which of the following are valid ways to deploy an Android application to a device?

Answers:

  • Using the “adb install /path/to/apk” command from the command prompt/terminal, when USB Debugging Mode is enabled in the device.
  • Exporting and signing the package, then browsing it to install.
  • Launching the application from an IDE, when USB Debugging Mode is enabled in the device.
  • All of these.

26. Which of the following classes is not used in working with database?

Answers:

  1. SQLiteOpenHelper
  2. SQLiteDatabase
  3. ContentProvider
  4. DatabaseHelper

27. Consider the XML fragment below, which is taken from one of the files in an Android project:
<MyElement xmlns:”http://schemas.androd.com/apk/res/android”
android:layout_width = “fill_parent”
android:layout_height = “fill_parent”
android:text = “Some Text”>
</MyElement>
Which of the following are true about the XML fragment above?

Answers:

  1. It is taken from the manifest XML file of the Android project.
  2. It is taken from an XML file used to define a view.
  3. It is taken from the package file (.apk) of the Android project.
  4. The xmlns: attribute is a compulsory attribute.
  5. If this is not the outer most tag in the XML file then it need not contain the xmlns: attribute.
  6. MyElement should be the name of a class derived, directly or indirectly, from the View class.

28. Which of the following statement is correct regarding StrictMode?

Answers:

  1. StrictMode detects improper layouts
  2. StrictMode detects operation which blocks UI
  3. StrictMode detects the speed of the connection
  4. All of the above

29. Consider the code snippet below:
MediaPlayer mp = new MediaPlayer();

mp.setDataSource(PATH_TO_FILE);

<Some code here>

mp.start();
Which of the following should be placed at <Some code here>?

Answers:

  1. mp.prepare();
  2. mp.prepareAsync();
  3. mp.loadMedia();
  4. mp.loadSource();
  5. mp.loadSource(); mp.prepare();
  6. No code is required at <Some code here> to start playback.

30. Consider the code snippet below:

public class MyReceiver extends PhoneStateIntentReceiver

{

@Override

public void onReceiveIntent(Context context, Intent intent)

{

if (intent.action == Intent.CALL_ACTION)

{

}

}

}

Assuming that notifyPhoneCallState has been called to enable MyReceiver to receive notifications about the phone call states, in which of the following cases will the code in get executed?

Answers:

  1. When the device receives an incoming phone call.
  2. When an outgoing phone call is initiated on the device.
  3. When the user presses the CALL button on the device.
  4. The code in will never get executed.

31. Which of the following are true about enabling/disabling menu items from an Activity class?

Answers:

  1. onCreateOptionsMenu can be used to enable/disable some menu items in an Android application.
  2. onPrepareOptionsMenu can be used to enable/disable some menu items in an Android application.
  3. onShowOptionsMenu can be used to enable/disable some menu items in an Android application.
  4. The menu items in an Android application cannot be disabled.

32. Which of the following should be used to save the unsaved data and release resources being used by an Android application?

Answers:

  1. Activity.onStop()
  2. Activity.onPause()
  3. Activity.onDestroy()
  4. Activity.onShutdown()
  5. Activity.onFreeze()

33. Which of the following statements are correct with regards to publishing updates of apps on Google Play?

Answers:

  1. The android:versionCode attribute in the manifest file must be incremented and the APK file must be signed with the same private key.
  2. The android:versionCode attribute in the manifest file must be same and the APK file must be signed with the same private key.
  3. The android:versionCode attribute in the manifest file must be incremented and the APK file must be signed with the new private key.
  4. The android:versionCode attribute in the manifest file must be same and the APK file must be signed with the new private key.

34. Which of the following would you have to include in your project to use the SimpleAdapter class?

Answers:

  1. import android.content;
  2. import android.widget;
  3. import android.database;
  4. import android.database.sqlite;
  5. import android.util;

35. Which of the following is/are appropriate for saving the state of an Android application?

Answers:

  1. Activity.onFreeze()
  2. Activity.onPause()
  3. Activity.onStop()
  4. Activity.onDestroy()

36. Which of the following is the parent class for the main application class in an Android application that has a user interface?

Answers:

  1. MIDLet
  2. AndroidApp
  3. Activity
  4. AppLet
  5. Application

37. Which of the following can be used to bind data from an SQL database to a ListView in an Android application?

Answers:

  1. SimpleCursor
  2. SimpleCursorAdapter
  3. SimpleAdapter
  4. SQLiteCursor
  5. SQLLiteAdapter

38. Consider the code snippet below:

MediaPlayer mp = new MediaPlayer();

mp.setDataSource(PATH_TO_FILE);

<Some code here>

mp.start();

Which of the following should be placed at <Some code here>?

Answers:

  1. mp.prepare();
  2. mp.prepareAsync();
  3. mp.loadMedia();
  4. mp.loadSource();
  5. mp.loadSource(); mp.prepare();
  6. No code is required at <Some code here> to start playback.

39. Which of the following packages provide the classes required to manage the Bluetooth functionality on an Android device?

Answers:

  1. android.hardware
  2. android.bluetooth
  3. android.bluez
  4. org.bluez

40. Which of the following can be accomplished by using the TelephoneNumberUtil class?

Answers:

  1. Save a phone number to the contacts in the phone device.
  2. Retrieve a phone number from the contacts in the phone device.
  3. Delete a phone number from the contacts in the phone device.
  4. Format an international telephone number.
  5. Setting and retrieving the call forwarding phone number on the phone device.

41. Which of the following is the best way to request user permission if an Android application receives location updates from both NETWORK_PROVIDER and GPS_PROVIDER?

Answers:

  1. Adding this line to the Android manifest file: <uses-permission android:name=”android.permission.ACCESS_FINE_LOCATION” />
  2. Adding these two lines to the Android manifest file: <uses-permission android:name=”android.permission.ACCESS_FINE_LOCATION” /> <uses-permission android:name=”android.permission.ACCESS_COARSE_LOCATION” />
  3. Adding this line to the Android manifest file: <uses-permission android:name=”android.permission.ACCESS_FINE_LOCATION” />
  4. Adding this line to the Android manifest file: <uses-permission android:name=”android.permission.CONTROL_LOCATION_UPDATES” />

42. Which of the following are true about PhoneStateIntentReceiver.notifyPhoneCallState?

Answers:

  1. notifyPhoneCallState has to be called if your application wishes to receive a notification about an incoming phone call.
  2. notifyPhoneCallState is a call back function that is called when the call state changes.
  3. notifyPhoneCallState is called to initiate a call from the device.
  4. notifyPhoneCallState is used to send notifications about call states.
  5. notifyPhoneCallState gets called when the device receives an incoming phone call.

43. Which of the following statements are correct with regards to Content Providers?

A) A content provider allows applications to access data.
B) A content provider must be declared in the AndroidManifest.xml file.

Answers:

  1. Statement A is true, while Statement B is false.
  2. Statement B is true, while Statement A is false.
  3. Both statements are true.
  4. Both statements are false.

44. Which of the following functions will return all available Content Providers?

Answers:

  1. List<ProviderInfo> returnList = new ArrayList<ProvderInfo>(); for (PackageInfo pack : getPackageManager().getInstalledPackages(PackageManager.GET_PROVIDERS)) { ProviderInfo[] providers = pack.providers; if (providers != null) { returnList.addAll(Arrays.asList(providers)); } } return returnList;
  2. return getContext().getPackageManager().queryContentProviders(“com.google”, Process.myUid(), 0);
  3. List<ActivityInfo> returnList = new ArrayList<ActivityInfo>(); for (PackageInfo pack : getPackageManager().getInstalledPackages(PackageManager.GET_RECEIVERS)) { ActivityInfo[] providers = pack.receivers; if (providers != null) { returnList.addAll(Arrays.asList(providers)); } } return returnList;
  4. None of these.

45. What is the purpose of the ContentProvider class?

Answers:

  1. To play rich media content files.
  2. To create and publish rich media files.
  3. To share data between Android applications.
  4. To access the global information about an application environment.
  5. To maintain global application state.

46. Which of the following are true?

Answers:

  1. Both startActivity and startSubActivity start an activity synchronously.
  2. Both startActivity and startActivityForResults start an activity asynchronously.
  3. startActivity is an asynchronous call, but startSubActivity is synchronous.
  4. startActivity is a synchronous call, but startSubActivity is asynchronous.

47. Which of the following is the immediate base class for Activity and Service classes?

Answers:

  1. Application
  2. ApplicationContext
  3. Context
  4. Component
  5. Object

48. Which of the following are classes that can be used to handle the Bluetooth functionality on a device?

Answers:

  1. Adapte
  2. Manage
  3. Matche
  4. BluetoothAdapte

49. How many expansion files can an APK file have? Select all correct options.

Answers:

  1. one
  2. two
  3. three
  4. four

50. Which of the following are Android build modes?

Answers:

  1. Debug mode
  2. Release mode
  3. Production mode
  4. Development mode

51. What is “Android-dx”?

Answers:

  1. A command line tool to create Android project files.
  2. A framework to create unit tests for Android projects.
  3. A resource editor to create user interface for Android applications.
  4. A tool to generate Android byte code from .class files.
  5. An emulator to execute and debug Android projects.

52. Consider the XML fragment below, which is taken from one of the files in an Android project:

<MyElement xmlns:”http://schemas.androd.com/apk/res/android”

android:layout_width = “fill_parent”

android:layout_height = “fill_parent”

android:text = “Some Text”>

</MyElement>

Which of the following are true about the XML fragment above?

Answers:

  1. It is taken from the manifest xml file of the Android project.
  2. It is taken from an XML file used to define a view.
  3. It is taken from the package file (.apk) of the Android project.
  4. The xmlns: attribute is a compulsory attribute.
  5. If this is not the outer most tag in the XML file then it need not contain the xmlns: attribute.
  6. MyElement should be the name of a class derived, directly or indirectly, from the View class.

53. Which of the following fields of the Message class should be used to store custom message codes about the Message?

Answers:

  1. tag
  2. what
  3. arg1
  4. arg2
  5. userData

54. Suppose Screen1 is the main screen of an Android application MyAndroid. Now if another screen, Screen2 has to be opened from Screen1, then which of the following are true?

Answers:

  1. Screen2 has to be a part of MyAndroid.
  2. Screen2 can exist in any other Android application installed on the device.
  3. Screen2 will always be launched asynchronously.
  4. Screen2 can be launched synchronously.
  5. Screen2 can return a result code to Screen1 if launched with startActivity.
  6. Screen2 can return a result code to Screen1 if launched with startActivityForResult.

55. Select the two function calls that can be used to start a Service from your Android application?

Answers:

  1. bindService
  2. startService
  3. runService
  4. startActivity

56. Which of the following Integrated Development Environments can be used for developing software applications for the Android platform?

Answers:

  1. Android IDE
  2. Eclipse
  3. Visual Studio 2005
  4. Visual Studio 2008

57. Which of the following can you use to display an HTML web page in an Android application?

Answers:

  1. WebBrowser
  2. BrowserView
  3. WebView
  4. Browser
  5. HtmlView

58. Consider the following snippet of code:
<font size =2>
@Override
protected void onStop
{
Super.onStop();
SharedPreferences setting = getSharedPreferences(“MyPrefs”, 0);
SharedPreferences.Editor editor = settings.edit();
editor.putBoolean(“MyBool”, true);

<some more code here>
}

Which of the following should be used <some more code here>?
</font

Answers:

  1. editor.save(); editor.close();
  2. editor.save(); editor.finish();
  3. editor.commit();
  4. editor.save();
  5. editor.close();
  6. editor.finish();

59. What is “Android-Positron”?

Answers:

  1. A command line tool to create Android project files.
  2. A framework to create unit tests for Android projects.
  3. A resource editor to create user interface for Android applications.
  4. A tool to generate Android byte code from .class files.
  5. An emulator to execute and debug Android projects.

60. Which of the following can you use to add items to the screen menu?

Answers:

  1. Activity.onCreate
  2. Activity.onCreateOptionsMenu
  3. Constructor of the Activity class.
  4. Activity.onCreateMenu
  5. Activity.onStart
  6. Activity.onPrepareOptionsMenu

61. Which of the following is not a life-cycle methods of an Activity that can be implemented to perform various operations during the lifetime of an Activity?

Answers:

  1. onCreate
  2. onInit
  3. onCompleteThaw
  4. onRestart

62. What is the interface Spannable used for?

Answers:

  1. Manipulate text that can span across multiple pages.
  2. Manipulate text that can span across multiple TextView windows.
  3. This is the interface for text to which markup objects can be attached and detached.
  4. String parsing.

63. What is correct regarding GCM – Google Cloud Messaging service?

Answers:

  1. It does server to device communication.
  2. It does device to server communication.
  3. It does device to server communication and vice versa.
  4. It does device to device communication.

64. Which of the following procedures will get the package name of an APK file?

Answers:

  1. Looking for the package attribute’s value of the <manifest> element in the manifest file.
  2. Executing the command, “pm list packages -f”, in the ADB shell.
  3. Programmatically, using PackageManager in an installed Android app.
  4. Using the AAPT platform tool, “aapt dump badging apkName.apk”.

65. What is the maximum supported file size for a single APK file (excluding expansion packages) in the Google Play Store?
Answers:

  1. 50MB
  2. 2GB
  3. 30MB
  4. unlimited

66. What is Android?
Answers:

  1. A new programming language that can be used to develop applications for mobile devices.
  2. A new IDE that can be used to develop applications for mobile devices.
  3. A software stack for mobile devices that includes an operating system, middleware and key applications.
  4. A new mobile device developed by Google.

67. Which of the following can be used to navigate between screens of different Android applications?

Answers:

  1. Binde
  2. Flow
  3. Navigate
  4. Intent
  5. ApplicationContext

68. Which of the following are valid features that you can request using requestWindowFeature?

Answers:

  1. FEATURE_NO_TITLE
  2. FEATURE_NO_ICON
  3. FEATURE_RIGHT_ICON
  4. FEATURE_NO_MENU
  5. FEATURE_TRANSPARENT_WINDOW

69. Which of the following are true?

Answers:

  1. startActivity and startActivityForResult can both be used to start a new activity from your activity class.
  2. Only startActivityForResult can be used to launch a new activity from your activity class.
  3. startActivity(myIntent); and startActivityForResult(myIntent, -1); have the same result.
  4. startActivity(myIntent); and startActivityForResult(myIntent, 0); have the same result.
  5. When startActivity is used to launch a new activity from your activity class then your activity class gets notified when the new activity is completed.
  6. When startActivityForResult is used to launch a new activity from your activity class then your activity class gets notified when the new activity is completed.

70. Which of the following can you use to display a progress bar in an Android application?

Answers:

  1. ProgressBa
  2. ProgressDialog
  3. ProgressItem

71. Which of the following can be used to handle commands from menu items in an Android application?

Answers:

  1. commandAction
  2. onMenuItem
  3. onMenuItemSelected
  4. onMenuItemClicked
  5. onOptionsItemSelected

72. Fill in the blank:

Once an app is published, the ________ cannot be changed. It should be unique for each APK.

Answers:

  1. private key
  2. package name
  3. main activity
  4. APK file name

73. Which of the following attributes in the manifest file defines version information of an application for the Google Play Store (as opposed to defining version information for display to users)?

Answers:

  1. android:versionCode
  2. android:versionName
  3. android:targetSdkVersion
  4. android:maxSdkVersion

74. Which of the following are true about Intent.CALL_ACTION and Intent.DIAL_ACTION?

Answers:

  1. Both of them are used to dial a phone number on the device.
  2. Intent.action == Intent.CALL_ACTION is true when a phone call is received on the device.
  3. Intent.action = Intent.CALL_ACTION is used when a phone number is to be dialled without showing a UI on the device.
  4. Intent.action = Intent.DIAL_ACTION is used when a phone number is to be dialled without showing a UI on the device.
  5. Intent.action = Intent.CALL_ACTION is used when a phone number is to be dialled without the user having to explicitly initiate the call.
  6. Intent.action = Intent.DIAL_ACTION is used when a phone number is to be dialled without the user having to explicitly initiate the call.

75. Suppose MyView is a class derived from View and mView is a variable of type MyView. Which of the following should be used to display mView when the Android application is started?

Answers:

  1. Call setCurrentView(mView) in the startApp() of the main application class.
  2. Call setContentView(mView) in the startApp() of the main application class.
  3. Call setContentView(mView) in the onStart() of the main application class.
  4. Call setContentView(mView) in the onCreate() of the main application class.

76. Which of the following programming languages can be used to develop software applications for the Android platform?

Answers:

  1. Java
  2. C# with .NET Compact Framework for mobile devices.
  3. C programming language.
  4. Android programming language.

77. Which of the following would you have to include in your project to use the APIs and classes required to access the camera on the mobile device?

Answers:

  1. import android.drivers;
  2. import android.hardware.camera;
  3. import android.camera;
  4. import android.util;
  5. import android.hardware;

78. What is “Android-activityCreator”?

Answers:

  1. A command line tool to create Android project files.
  2. A framework to create unit tests for Android projects.
  3. A resource editor to create user interface for Android applications.
  4. A tool to generate Android byte code from .class files.
  5. An emulator to execute and debug Android projects.

79. What is the maximum supported size for a single expansion file in the Google Play Store?

Answers:

  1. 50MB
  2. 2GB
  3. 30MB
  4. unlimited

80. Which of the following tools can be used to reduce apk package size?

Answers:

  1. lint
  2. ProGuard
  3. zipalign
  4. etc1tool

10,935 total views, 74 views today

Top 10 popular test answers

English Spelling Test (U.S. Version) 2016

Published by:

1. Identify the misspelled word in the list below.

Answers:

  1. Pageant
  2. Poignant
  3. Plummage
  4. Priggish

2. Choose the correct spelling of the word from the options below.

Answers:

  1. Persue
  2. Parsue
  3. Persou
  4. Pursue

3. Complete the following sentence by choosing the correct spelling of the missing word.

The judge granted the reluctant witness complete ____________ from prosecution for his part in the crime.

Answers:

  1. amnesty
  2. amnasty
  3. anmesty
  4. emnesty

4. Choose the correct spelling of the word from the options below.

Answers:

  1. Vacuum
  2. Vaccuum
  3. Vacumm
  4. Vaccum

5. Complete the following sentence by choosing the correct spelling of the missing word.

Arthur spent hours admiring the gothic ____________of all those French cathedrals.

Answers:

  1. architecture
  2. arkhitecture
  3. arcitecture
  4. arckitecture

6. Choose the correct spelling of the word from the options below.

Answers:

  1. Forfiet
  2. Forfeit
  3. Forefeit
  4. Fourfit

7. Complete the following sentence by choosing the correct spelling of the missing word.

The waitress brought me a plate of squid even though I _____________ asked for clams.

Answers:

  1. specificaly
  2. specifically
  3. specifycally
  4. specificly

8. Choose the correct spelling of the word from the options below.

Answers:

  1. Posess
  2. Poesess
  3. Possess
  4. Pozess

9. Choose the correct spelling of the word from the options below.

Answers:

  1. Idiosyncracy
  2. Idiosincrasy
  3. Idiosyncrasy
  4. Ideosyncracy

10. Choose the correct spelling of the word from the options below.

Answers:

  1. Manoeuvar
  2. Manouver
  3. Maneuver
  4. Manuver

11. Identify the misspelled word in the list below.

Answers:

  1. CouncelorM
  2. Condescend
  3. Camouflage
  4. Criticize

12. Complete the following sentence by choosing the correct spelling of the missing word.

Sam _________ a successful political campaign.

Answers:

  1. orchestraited
  2. orchestrated
  3. orchestreated
  4. orcestrated

13. Identify the misspelled word in the list below.

Answers:

  1. Rhythmical
  2. Reminiscence
  3. Rheumatism
  4. Resevoir

14. Choose the correct spelling of the word from the options below.

Answers:

  1. Reminiscience
  2. Reminiscence
  3. Reminescence
  4. Reminisense

15. Identify the misspelled word in the list below.

Answers:

  1. Yacht
  2. Youthful
  3. Yeilding
  4. Yesterday

16. Identify the misspelled word in the list below.

Answers:

  1. Wierd
  2. Wired
  3. Whined
  4. Willful

17. Choose the correct spelling of the word from the options below.

Answers:

  1. Embarassment
  2. Embrassement
  3. Embarrasment
  4. Embarrassment

18. Complete the following sentence by choosing the correct spelling of the missing word.

He __________ a summer house, an exercise bike, and a hamster in the divorce settlement.

Answers:

  1. accquired
  2. ecquired
  3. acquired
  4. akquired

19. Identify the misspelled word in the list below.

Answers:

  1. Cachet
  2. Connoisseur
  3. Charateristic
  4. Catastrophe

20. Choose the correct spelling of the word from the options below.

Answers:

  1. Adress
  2. Addrress
  3. Addres
  4. Address

21. Choose the correct spelling of the word from the options below.

Answers:

  1. Temperamental
  2. Tempermental
  3. Temperamentle
  4. Temparamental

22. Identify the misspelled word in the list below.

Answers:

  1. Accomodate
  2. Analyze
  3. Acknowledgment
  4. Asterisk

23. Choose the correct spelling of the word from the options below.

Answers:

  1. Heinous
  2. Henous
  3. Heinus

24. Complete the following sentence by choosing the correct spelling of the missing word.

The protesters hurled ___________ insults at us as we walked by.

Answers:

  1. vicous
  2. vicious
  3. vicoius
  4. vicius

25. Choose the correct spelling of the word from the options below.

Answers:

  1. Gauge
  2. Gaje
  3. Guage
  4. Gaige

26. Complete the following sentence by choosing the correct spelling of the missing word.

Their relationship was plagued by __________ problems.

Answers:

  1. perpetual
  2. perpechual
  3. purpetual
  4. perptual

27. Choose the correct spelling of the word from the options below.

Answers:

  1. Excesive
  2. Exccesive
  3. Excessive
  4. Exceesive

28. Choose the correct spelling of the word from the options below.

Answers:

  1. Priveledge
  2. Privilage
  3. Privilege
  4. Privelege

29. Complete the following sentence by choosing the correct spelling of the missing word.

The purpose of your report should be to ___________ the most relevant facts, not to obscure them.

Answers:

  1. illumenate
  2. iluminate
  3. illuminate
  4. elluminate

30. Complete the following sentence by choosing the correct spelling of the missing word.

On the ____________ day of Christmas, Lucy was annoyed to find her yard full of noisy drummers drumming.

Answers:

  1. twelvth
  2. twelfth
  3. twelfeth
  4. twelth

31. Choose the correct spelling of the word from the options below.

Answers:

  1. Exhilirate
  2. Exhilarate
  3. Exhilireat
  4. Exhilrate

32. Choose the correct spelling of the word from the options below.

Answers:

  1. Bureaucrasy
  2. Buroucracy
  3. Bureaucracy
  4. Beuraucracy

33. Complete the following sentence by choosing the correct spelling of the missing word.

Hazel Dormouse is a _________ creature.

Answers:

  1. nocternal
  2. nocturnal
  3. noctarnal
  4. nacturnal

34. Complete the following sentence by choosing the correct spelling of the missing word.

The church members accused the cult of _______________ practices.

Answers:

  1. sacreligious
  2. sacrelegious
  3. sacrilegious
  4. sacrilgious

35. Identify the misspelled word in the list below.

Answers:

  1. Hemorrhage
  2. Harass
  3. Hankerchief
  4. Hypocrisy

36. Identify the misspelled word in the list below.

Answers:

  1. Sophomore
  2. Supersede
  3. Susceptable
  4. Spontaneous

37. Choose the correct spelling of the word from the options below.

Answers:

  1. Conscentiuos
  2. Consentious
  3. Conscientous
  4. Conscientious

38. Identify the misspelled word in the list below.

Answers:

  1. Enhancement
  2. Elicit
  3. Enegma
  4. Ecstasy

39. Complete the following sentence by choosing the correct spelling of the missing word.

No one knew what devious experiments the scientist conducted in his ______________ .

Answers:

  1. labretory
  2. laboratary
  3. laboratory
  4. labratory

40. Complete the following sentence by choosing the correct spelling of the missing word.

Emma has always been fascinated by the way the mind works, so she’s decided to get a degree in __________.

Answers:

  1. pshycology
  2. psycology
  3. psyhcology
  4. psychology

41. Complete the following sentence by choosing the correct spelling of the missing word.

Helen was surprised by the __________ stature of her blind date.

Answers:

  1. diminutive
  2. diminuative
  3. deminutive
  4. dimminutive

42. Complete the following sentence by choosing the correct spelling of the missing word.

Peter always makes such a _____________ of himself!

Answers:

  1. nuisance
  2. nuisents
  3. newsanse
  4. nuisince

43. Complete the following sentence by choosing the correct spelling of the missing word.

Mrs. Baker took her ______________ class on a field trip to the zoo.

Answers:

  1. kindergarden
  2. kindegarten
  3. kindergarten
  4. kindegarden

44. Complete the following sentence by choosing the correct spelling of the missing word.

The crowd ________________ me on my acceptance into Mensa.

Answers:

  1. congradulated
  2. congrachulated
  3. congratulated
  4. congratilated

45. Complete the following sentence by choosing the correct spelling of the missing word.

The annual _____________ was ruined when a family of bears stole all the hotdogs.

Answers:

  1. barbecue
  2. barbequeue
  3. barbycue
  4. barbcue

46. Complete the following sentence by choosing the correct spelling of the missing word.

Sally’s nervous __________ left her standing at the altar.

Answers:

  1. fiancé
  2. finance
  3. feancé
  4. fience

47. Complete the following sentence by choosing the correct spelling of the missing word.

Clara the cat simply chose to ignore the ______________ of our dog.

Answers:

  1. existence
  2. existance
  3. existense
  4. existanse

48. Complete the following sentence by choosing the correct spelling of the missing word.

My father does not believe in ____________ , but my mother does.

Answers:

  1. reincanation
  2. reincarenation
  3. reincarnation
  4. reincantation

49. Complete the following sentence by choosing the correct spelling of the missing word.

The savvy dancer acted as a __________ between the detective and the cabaret owner.

Answers:

  1. liasion
  2. liaison
  3. liasone
  4. leason

50. Which of the following options means, “the owner or manager of a restaurant”?

Answers:

  1. Restaureter
  2. Restaurater
  3. Restaurateur
  4. Restourateur

51. Complete the following sentence by choosing the correct spelling of the missing word.

Be sure to leave your travel __________with the secretary so he’ll know how to reach you while you’re away.

Answers:

  1. tenreray
  2. itinerary
  3. iteneray
  4. itinirary

52. Complete the following sentence by choosing the correct spelling of the missing word.

The clown’s performance was _______________, to say the least.

Answers:

  1. dissapointing
  2. dissappointing
  3. disapointing
  4. disappointing

53. Complete the following sentence by choosing the correct spelling of the missing word.

_________animals feed almost exclusively on meat.

Answers:

  1. Carnivorus
  2. Carnivorous
  3. Carnivoures
  4. Carnivoreus

54. Complete the following sentence by choosing the correct spelling of the missing word.

After my grandfather was diagnosed with chronic_________, he moved to Arizona.

Answers:

  1. Neumonia
  2. Penumonia
  3. Pneumonia
  4. Pnuemonia

55. Complete the following sentence by choosing the correct spelling of the missing word.

He wrote __________on every topic from shoestrings to string theory.

Answers:

  1. prollifically
  2. prolificaly
  3. prollificaly
  4. prolifically

56. Complete the following sentence by choosing the correct spelling of the missing word.

Let me tie your mittens to your sleeves so you don’t ______________ them.

Answers:

  1. loose
  2. looze
  3. lose
  4. louse

57. Complete the following sentence by choosing the correct spelling of the missing word.

Many would-be travelers were _____________ by the price of gas last summer.

Answers:

  1. flabergasted
  2. flabberghasted
  3. flabbergasted
  4. flabbergashted

58. Complete the following sentence by choosing the correct spelling of the missing word.

The professor made it clear that ___________ would not be tolerated.

Answers:

  1. plagiarism
  2. plagiarizm
  3. plagerism
  4. plagirism

10,496 total views, 40 views today