1. Trang chủ
  2. » Công Nghệ Thông Tin

PCS theory

24 561 3

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 24
Dung lượng 138 KB

Nội dung

Đề thi aptech

PCS THEORY 1. Variables of this data types store actual values. This value stored in a stack. a. Value Type b. Reference Type. 2.Variable of reference type store the memory address of other variables in a Stack. a. True b. False 3. The Reference Data Types are: 3 choices a. int,float b. String,Object c. Class , interface d. byte, bit e. Array , Delegate 4. The built-in reference data types are : 2 choices a. Class b. Object c. Delegate d. Array , Interface e. String 5. XML Comments begin with : a. Three forward slashes b. Three asterisks c. double slashes 6. Constants are declared for value types rather than for reference types. a. True b. False 7. This statement ensure that no other process or threads running in the computer memory can interfere with the code. ensure security and only work with reference type. a. Selection statement b. Iteration statement c. Jump Statement d. Fixed Statement e. Lock Statement 8. This statement is required to tell the garbage collector not to move that object during execution. a. Jump Statement b. lock statement c. Fixed Statement d. Checked and Unchecked Statement 9. Which statements are true? a. The conditional operator works with two operands b. The increment operator works with a single operand c. The bitwise exclusive OR operator compares bits and return 1 if only one of the bits is -1. d. the conditional && operator does not check the seconds expression if the first expression is false e. The compound assignment operators execute from right to left. 10. This typeCasting is carried out automatically by the compiler. Explicit Implicit 11. the class which provides useful methods to convert any built-in data type to another built-in data type. System.Console.Convert System.Convert 12. This refers to converting a reference type to a value type. Boxing UnBoxing 13. This is a process for converting a value type to its reference type. this useful to reduce the overhead on the system during execution. UnBoxing Boxing 14. This array is a multi-dimensional array and is reference to as an array of arrays. It considers of multiple arrays where the number of elements within each array can be different. Rectangular Array. Jagged Array. 15. This has improved performance and unequal number of columns. a. Rectangular Array b. Single- dimensional Array c. Jagged Array d. Multi- dimensional Array 16. This has many rows and columns. a. Multi- dimensional Array b. Single- dimensional Array c. Rectangular Array d. Jagged Array 17. This allows you to create arrays using the CreateInstance() method. a. Array b. New c. Array class 18. Method which is used to create Multi- Dimension Array a. public static Array CreateInstance(type elementType, int length); b. public static Array CreateArray(type elementType, int length); c. public static Array CreateInstance(type elementType, int rows, int columns); 19. This is the feature of extracting only the required information from object. It’s not show all technical details of object. a. Encapsulation b. Inheritance c. Abstraction d. Polymorphism 20. Details of what a class contains need not be visible to other classes and objects that use it. a. Encapsulation b. Inheritance c. Polymorphism d. Abstraction 21. A method name can be an underscore or the "@" character. a. True b. Fasle 22. This variable is a special type that is accessed without using an Object of a class. public variable protect variable static variable final 23. This access modifier allows the class members to be accessible within the class as well as within the derived class. internal protected private 24. This access modifier allows the class members to be accessible only within the classes of the same assembly. a. protected b. public c. internal 25. This keyword causes arguments to passed in a method by reference 2 choices a. args b. ref c. reg d. this e. out 26.The keyword is used to resolve conflicts between variables having same names and to pass the current object as a parameter. out this ref 27. You cannot use the 'this' keyword with static variables and method. True False 28. A destructor starts with the character '@' before the class name. True False 29. which statements are true?- 3 choices a. Destructors cannot be overloaded or inherited b. Destructors can be overloaded but not be inherited c. Destructors cannot be explicitly invoked d. Destructors cannot specify access modifiers and take parameters e. May be more than two Destructor in a class 30. You can use the 'base' keyword for invoking the static methods of the base class. True False 31. So as to override a particular method of base class in the derived class, we need to declare the method of base class using the keyword. a. override b. virtual 32. This keyword prevents a class from being inherited by any other class. a. Seales b. Sealed c. prevents d. out e. virtual 33. When implementing an interface in a class, you need to implement all the abstract methods declared in the interface. True False 34. Properties cannot be classified as variables but, They can use the ref and out keywords. a. True b. False 35. These are defined with two accessors or methods, the get and set accessors. a. Properties b. Fields 36. These represent the behavior of an Object. a. Fields b. Properties c. Methods 37. These represent characteristic of an Object. Can not have any parameters. and can be overidden but cannot be Overload. a. Properties b. Methods. c. Fields 38. Some of most Namespaces of System are:- 4 choices a. System.Collections. b. System.Data c. System.namespaces d. System.Io / System.Net e. System.Diagnostics 39. This namespace contains classes and interfaces that define conplex data structure as lists,queues and dictionaries. a. System.Diagnostics b. System.IO / System.Net c. System.Data d. System.Collections. e. System.Web 40. This namespace contains classes that make up ADO.NET architecture. A. System.Web B. System.Collections. C. System.Diagnostics D. System.Io / System.Net E. System.Data 41. This namespace contains classes that are used to interact with the system processes. A. System.Data B. System.Diagnostics C. System.Io / System.Net D. System.Web 42. This namespace contains classes that enable you to read from and write to data stream and file. A. System.Diagnostics B. System.Web C. System.IO D. System.Net 43. This namespace contains classes that you yo create Web-base applications. A. System.Net B. System.Web C. System.Diagnostics 44. This namespace provides classes and interfaces that allow communication between the browser and the serevr. A. System.Net B. System.Web C. System.Data 45. You can apply access modifier such as public, protected, private to namspaces A. True B. False(your answer) 41. Which declaration is used to declare a property. a. public string property_Name(int parameter) { // body } b. public string Property_Name { //body. } c. public string this[int Property_name] { // body } d. public delegate Property_Name(typeData parameter1, typeData parameter2); public string property_Name() { //body } 42. Which declaration is used to declare a indexer. a. public string [int index]() { //body } b. public string int[int index] { //body } c. public string this[int index]() { //body } d. public string this[int index] { //body } 43. Which declaration is used to declare a delegate. a. public delegates Delagate_Name(int parameter1,int parameter2){} b. public delegates Delagates_Name(int parameter1,int parameter2); c. public delegate int Delagates_Name(int parameter1,int parameter2); d. public delegate float Delagate_Name(int parameter1,int parameter2){} 44. Which data structure can not be declared in a namespace ? a. Abstract b. Interface c. Structure d. Enumeration e. Delegate 45. Namespaces control scopes of a class. True False 46. These Exception are thrown by the CLR. a. System-level Exceptions b. Application-level Exceptions. 47. Returns the exception instance that caused the current Exception. a. Message b. StrackTrace c. InnerException 48. This exception is thrown when the result of an arithmetic, casting or conversion operation is to large to be stored in the destination object or variable. a. System.ArithmaticException b. System.InvalidCastException c. System.OverflowException d. System.FormatException 49. Customer exceptions can be used to changed the built-in exceptions with modified message. True False 50. Can is Delegate declared within class? True False 51. Which statements are true? a. Delegates are used ti hide static methods. b. Delegates are declared with a return type that may or may not be the same as the return type of the referenced method. c. Delegates are used to invoke overridden methods. 52. Events can be declared in :- 2 choices Classes Methods Interfaces Absract / Sealed Delegates 58. Events can be declared as : - 2 choices. A. Classes B. Abstract / Sealed C. interfaces D. Methods E. Virtual 53. Events are implemented using delegates. True False 54. Steps for implementing events in C# are: 1. Create the event using the delegate. 2. Subscribe to listen and handle the event. 3. Define a public delegate for the event 4. Raise the event. a. 1-2-3-4 b. 1-3-4-2 c. 3-1-2-4 d. 3-1-4-2 55. How to declare Event? a. delegate delegate_name (parameters); event ; b. delegate delegate_name (parameters); event ; c. event ; 56. which statement are true for Delegate? a. public delegate int Add_Dele(int t1, int t2); class Delegate_Event { //public Add_Dele event dele_Event; public int add(int a,int b) { return (a+b); } public void Main(string[] args) { int v1 = 5; int v2 = 10; Add_Dele objDel = new Add_Dele(add); objDel(v1,v2); Console.WriteLine("Value1 + Value2 = " +objDel(v1,v2)); } } b. public delegate int Add_Dele(int t1, int t2); class Delegate_Event { //public Add_Dele event dele_Event; static int add(int a,int b) { return (a+b); } static void Main(string[] args) { int v1 = 5; int v2 = 10; Add_Dele objDel = new Add_Dele(add); objDel(v1,v2); Console.WriteLine("Value1 + Value2 = " +objDel(v1,v2)); } } 57. Which are true? a. Event can be declared in an Interface. b. Events can are declared as Abstract or Sealed 58. Supports simple iteration over elements of a generic collection. a. IList b. IDictionary c. ICollection d. IEnumerator 59. Represents a generic collection consisting of the key and value pairs. a. ICollection b. IDictionary c. IEnumerator 60. Which statement are true? a. Generics are used to work with multiple data type simultaneously. b. Generics are verified at run-time. c. Generics are declared with or without a type parameter d. Generics can be implemented without a need for explicit or implicit casting. 61. Which statements are true? a. Iterators use the yield break statement to end th iteration process. b. Iterators return a fixed number of values that cannot be changed 62. Which are true? - 2 choices a. The get accessor can be executed when the property is assigned a new value b. The get accessor can be declared using a parameter called value. c. The get accessor can be executed by referring to the name of the property. 1.Which of the following statement about C# varialble is incorrect ? A. A variable is a computer memory location identified by a unique name B. A variable's name is used to access and read the value stored in it A. A variable is allocated or deallocated in memory during runtime C. A variable can be initialized at the time of its creation or later [...]... any other NET language True 18 Automatic memory management decreases the quality of the code and reduces the performance and the productivity False 19 Developers create mobile applications for pocket PCs, PDAs and cell phones using the C# language True 20 C# application programming uses objects so that code written once can be reused True 21 VS 2005 is used for building high-performance desktop applications, . PCS THEORY 1. Variables of this data types store actual values. This value stored in a stack. a. Value. the performance and the productivity False 19. Developers create mobile applications for pocket PCs, PDAs and cell phones using the C# language True 20. C# application programming uses objects

Ngày đăng: 07/05/2014, 17:22

Xem thêm

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w