| 1. | A variable which is declared inside a method is called a________variable |
| A. | Serial |
| B. | Local |
| C. | Private |
| D. | Static |
| Answer» B. Local | |
| 2. | Which is the String method used to compare two strings with each other ? |
| A. | Compare To() |
| B. | Compare() |
| C. | Copy() |
| D. | ConCat() |
| Answer» B. Compare() | |
| 3. | Minimum and Maximum range of values supported by ‘float’ data type are ? |
| A. | 1.5 * 10 ^-40 to 3.4 * 10 ^38 |
| B. | 1.5 * 10 ^-45 to 3.4 * 10 ^30 |
| C. | 1.5 * 10 ^-45 to 3.4 * 10 ^38 |
| D. | 1.5 * 10 ^-45 to 3.4 * 10 ^37 |
| Answer» C. 1.5 * 10 ^-45 to 3.4 * 10 ^38 | |
| 4. | Which datatype should be more preferred for storing a simple number like 35 to improve execution speed of a program? |
| A. | sbyte |
| B. | short |
| C. | int |
| D. | long |
| Answer» A. sbyte | |
| 5. | What will be output of the following conversion ? static void Main(string[] args) { char a = ‘A’; string b = “a”; Console.WriteLine(Convert.ToInt32(a)); Console.WriteLine(Convert.ToInt32(Convert.Tochar(b))); Console.ReadLine(); } |
| A. | 1, 97 |
| B. | 65, 97 |
| C. | 65, 97 |
| D. | 97, 1 |
| Answer» C. 65, 97 | |
| 6. | Scope of variable is related to definition of variable as: 1. Region of code within which variable value is valid and hence can be accessed. 2. No, relation with region where variable is declared its value is valid in entire scope. |
| A. | a |
| B. | b |
| C. | a, b |
| D. | None of the mentioned |
| Answer» A. a | |
| 7. | Type of Conversion in which compiler is unable to convert the datatype implicitly is ? |
| A. | ushort to long |
| B. | int to uint |
| C. | ushort to long |
| D. | byte to decimal |
| Answer» B. int to uint | |
| 8. | Select output of the given set of Code : static void Main(string[] args) { String name = “Dr.Gupta”; Console.WriteLine(“Good Morning” + name); } |
| A. | Dr.Gupta |
| B. | Good Morning |
| C. | Good Morning Dr.Gupta |
| D. | Good Morning name |
| Answer» C. Good Morning Dr.Gupta | |
| 9. | Which of the following is an 8-byte Integer? |
| A. | Char |
| B. | Long |
| C. | Short |
| D. | Byte |
| Answer» B. Long | |
| 10. | Which of the following is NOT an Integer? |
| A. | Char |
| B. | Byte |
| C. | Integer |
| D. | Short |
| Answer» A. Char | |
| 11. | Which of the following are value types? 1.Integer 2.Array 3.Single 4.String 5.Long |
| A. | 1, 2, 5 |
| B. | 1, 3, 5 |
| C. | 2, 4 |
| D. | 3, 5 |
| Answer» B. 1, 3, 5 | |
| 12. | Which of the following does not store a sign? |
| A. | Short |
| B. | Integer |
| C. | Long |
| D. | Byte |
| Answer» D. Byte | |
| 13. | What is the size of a Decimal? |
| A. | 4 byte |
| B. | 8 byte |
| C. | 16 byte |
| D. | 32 byte |
| Answer» C. 16 byte | |
| 14. | Which of the following is the correct size of a Decimal datatype? |
| A. | 8 Bytes |
| B. | 4 Bytes |
| C. | 10 Bytes |
| D. | 16 Bytes |
| Answer» D. 16 Bytes | |
| 15. | Which of the following statements is correct? |
| A. | When a class inherits an interface it inherits member definitions as well as its implementations. |
| B. | An interface cannot contain the signature of an indexer. |
| C. | Interfaces members are automatically public. |
| D. | To implement an interface member, the corresponding member in the class must be public as well as static. |
| Answer» C. Interfaces members are automatically public. | |
| 16. | Which of the following can implement an interface? 1.Data 2.Class 3.Enum 4.Structure 5.Namespace |
| A. | 1, 3 |
| B. | 2, 4 |
| C. | 3, 5 |
| D. | 4 only |
| Answer» B. 2, 4 | |
| 17. | Which of the following will be the correct output for the C#.NET code snippet given below? String s1 = “ALL MEN ARE CREATED EQUAL”; String s2; s2 = s1.Substring(12, 3); Console.WriteLine(s2); |
| A. | ARE |
| B. | CRE |
| C. | CR |
| D. | REA |
| Answer» B. CRE | |
| 18. | If s1 and s2 are references to two strings, then which of the following is the correct way to compare the two references? |
| A. | s1 is s2 |
| B. | s1 = s2 |
| C. | s1.Equals(s2) |
| D. | strcmp(s1, s2) |
| Answer» C. s1.Equals(s2) | |
| 19. | Which of the following is the correct output of the C#.NET code snippet given below? int[ , , ] a = new int[ 3, 2, 3 ]; Console.WriteLine(a.Length); |
| A. | 20 |
| B. | 4 |
| C. | 18 |
| D. | 10 |
| Answer» C. 18 | |
| 20. | Which of the following are NOT Relational operators in C#.NET? 1.>= 2.!= 3.Not 4.<= 5.<>= |
| A. | 1, 3 |
| B. | 2, 4 |
| C. | 3, 5 |
| D. | 4, 5 |
| Answer» C. 3, 5 | |
| 21. | Which of the following is NOT an Assignment operator in C#.NET? |
| A. | \= |
| B. | /= |
| C. | *= |
| D. | += |
| Answer» A. \= | |
| 22. | A GUI: |
| A. | uses buttons, menus, and icons. |
| B. | should be easy for a user to manipulate. |
| C. | stands for Graphic Use Interaction. |
| D. | Both a and b. |
| Answer» D. Both a and b. | |
| 23. | Visual Studio .NET provides which feature: |
| A. | debugging. |
| B. | application deployment. |
| C. | syntax checking. |
| D. | All of the above.. |
| Answer» D. All of the above.. | |
| 24. | What does IDE stand for? |
| A. | Integrated Development Environment |
| B. | Integrated Design Environment |
| C. | Interior Development Environment |
| D. | Interior Design Environment |
| Answer» A. Integrated Development Environment | |
| 25. | Which is not a main component of the Visual Studio IDE? |
| A. | Solution Explorer |
| B. | Tool Box |
| C. | Start Menu |
| D. | Designer Window |
| Answer» C. Start Menu | |
| 26. | Which does the solution explorer not display? |
| A. | Form Properties |
| B. | Reference Folder |
| C. | Form File |
| D. | Assemble File |
| Answer» A. Form Properties | |
| 27. | The Button control can be activated: |
| A. | programmatically through the click event. |
| B. | by clicking the button with the mouse. |
| C. | with the form’s DefaultButton property. |
| D. | Both a and b. |
| Answer» D. Both a and b. | |
| 28. | Which sequence of char data types is listed from lowest to highest? |
| A. | a, A, z, Z |
| B. | a, z, A, Z |
| C. | A, a, Z, z |
| D. | A, Z, a, z |
| Answer» D. A, Z, a, z | |
| 29. | The Boolean data type: |
| A. | is unsigned. |
| B. | has two states. |
| C. | is displayed by the program as yes or no. |
| D. | Both a and b. |
| Answer» D. Both a and b. | |
| 30. | VB.Net identifiers: |
| A. | are case sensitive. |
| B. | can begin with an underscore. |
| C. | can begin with a number. |
| D. | Both a and b. |
| Answer» B. can begin with an underscore. | |
| 31. | The proper operator precedence, from first to last, is: |
| A. | logical, comparison, and arithmetic. |
| B. | arithmetic, comparison, and logical. |
| C. | arithmetic, logical, and comparison. |
| D. | comparison, arithmetic, and logical. |
| Answer» B. arithmetic, comparison, and logical. | |
| 32. | With A = False and B = True, which statement evaluates as True? |
| A. | A AND A |
| B. | A AND B |
| C. | B AND A |
| D. | B AND B |
| Answer» D. B AND B | |
| 33. | Which operator is evaluated first? |
| A. | NOT |
| B. | AND |
| C. | XOR |
| D. | OR |
| Answer» A. NOT | |
| 34. | In the For…Next statement the default value for the Step is: |
| A. | -1 |
| B. | 0 |
| C. | 1 |
| D. | 2 |
| Answer» C. 1 | |
| 35. | Which is a type of procedure found in VB.Net? |
| A. | Event |
| B. | Function |
| C. | Sub |
| D. | All of the above. |
| Answer» D. All of the above. | |
| 36. | A sub procedure is valuable because it: |
| A. | makes code easier to maintain. |
| B. | splits the logic to solve a problem into small, manageable units. |
| C. | limits the number of times the code can be accessed. |
| D. | Both a and b. |
| Answer» D. Both a and b. | |
| 37. | Which method will return the number of elements in an array? |
| A. | Dimension |
| B. | Length |
| C. | Number |
| D. | Size |
| Answer» B. Length | |
| 38. | What is required to reference an element in an array? |
| A. | Array name |
| B. | Index value of the element |
| C. | Element value |
| D. | Both a and b. |
| Answer» D. Both a and b. | |
| 39. | Which method will arrange the elements of an array in alphabetical order? |
| A. | Arrange |
| B. | Assemble |
| C. | Order |
| D. | Sort |
| Answer» D. Sort | |
| 40. | Which dialog control allows the user to zoom in on a document? |
| A. | PrintDialog |
| B. | PrintPreview |
| C. | PageSetupDialog |
| D. | Both a and b. |
| Answer» B. PrintPreview | |
| 41. | Which is not an ADO.NET DataAdapter Object? |
| A. | OleDbDataAdapter |
| B. | SQLDataAdapter |
| C. | QueryDataAdapter |
| D. | Both a and b. |
| Answer» C. QueryDataAdapter | |
| 42. | Where does a web application reside? |
| A. | Web client |
| B. | Web server |
| C. | Visual Studio .NET |
| D. | Both a and b. |
| Answer» B. Web server | |
| 43. | Which is an example of a web document? |
| A. | Server script |
| B. | Web page |
| C. | Client browser |
| D. | Both a and b. |
| Answer» D. Both a and b. | |
| 44. | A postback occurs when: |
| A. | a browser posts a form to the server. |
| B. | a user’s action activates the handing of a server event. |
| C. | a server posts a form to the client. |
| D. | Both a and b. |
| Answer» D. Both a and b. | |
| 45. | Which set of symbols are used to signify the presence of ASP.NET code? |
| A. | <@ |
| B. | <# |
| C. | <$ |
| D. | <% |
| Answer» D. <% | |
| 46. | Which is the file extension used for an ASP.NET file? |
| A. | asn |
| B. | asp |
| C. | aspn |
| D. | aspx |
| Answer» D. aspx | |
| 47. | What is the extension for a Visual Basic web form interface file? |
| A. | .asp |
| B. | .aspx |
| C. | .asp.vb |
| D. | .aspx.vb |
| Answer» B. .aspx | |
| 48. | When an ASP.NET file is placed on an IIS server and viewed through a browser, the resulting HTML page contains: |
| A. | all ASP.NET code. |
| B. | as much ASP.NET code as is in the ASP.NET file. |
| C. | a mix of ASP.NET and HTML code. |
| D. | all HTML code. |
| Answer» D. all HTML code. | |
| 49. | What is the extension for a Visual Basic web form code file? |
| A. | .asp |
| B. | .aspx |
| C. | .asp.vb |
| D. | .aspx.vb |
| Answer» D. .aspx.vb | |
| 50. | Which HTML tag creates a link to another browser page? |
| A. | A href |
| B. | A ref |
| C. | An href |
| D. | An ref |
| Answer» A. A href | |
Tags
Question and answers in .NET Programming,.NET Programming multiple choice questions and answers,.NET Programming Important MCQs,Solved MCQs for .NET Programming,.NET Programming MCQs with answers PDF download