Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 1 MCQs Introduction to .NET and C#

CSE253 — .Net Programming 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 Introduction to .NET and its features Easy

    What is .NET primarily used for?

  2. Question 2 of 60 Introduction to .NET and its features Easy

    Which feature allows .NET applications to run on multiple operating systems?

  3. Question 3 of 60 Difference between .NET Framework, .NET Core and .NET Easy

    Which platform was originally designed mainly for Windows applications?

  4. Question 4 of 60 Difference between .NET Framework, .NET Core and .NET Easy

    What is a major characteristic of .NET Core?

  5. Question 5 of 60 .NET SDK and Runtime Easy

    What does the .NET SDK provide?

  6. Question 6 of 60 .NET SDK and Runtime Easy

    What is the main purpose of the .NET Runtime?

  7. Question 7 of 60 Common Language Runtime (CLR) Easy

    What does CLR stand for?

  8. Question 8 of 60 Common Language Runtime (CLR) Easy

    Which service is commonly provided by the CLR?

  9. Question 9 of 60 .NET Class Library Easy

    What is the .NET Class Library?

  10. Question 10 of 60 .NET Class Library Easy

    Which task can be supported by classes in the .NET Class Library?

  11. Question 11 of 60 Setting up development environment using Visual Studio and VS Code Easy

    Which application is a full-featured IDE for .NET development?

  12. Question 12 of 60 Setting up development environment using Visual Studio and VS Code Easy

    What is Visual Studio Code commonly described as?

  13. Question 13 of 60 Introduction to .NET CLI and commonly used CLI commands Easy

    Which command creates a new .NET project?

  14. Question 14 of 60 Introduction to .NET CLI and commonly used CLI commands Easy

    Which command builds a .NET project?

  15. Question 15 of 60 Project structure in .NET applications Easy

    Which file commonly contains configuration for a .NET project?

  16. Question 16 of 60 NuGet Package Manager Easy

    What is NuGet used for in .NET development?

  17. Question 17 of 60 Building and executing .NET applications Easy

    Which command runs a .NET application from its project folder?

  18. Question 18 of 60 Introduction to C# Easy

    What type of programming language is C#?

  19. Question 19 of 60 C# program structure Easy

    Which method is traditionally used as the starting point of a C# console program?

  20. Question 20 of 60 Introduction to Git and GitHub for source code management Easy

    What is Git mainly used for?

  21. Question 21 of 60 Introduction to .NET and its features Medium

    A development team wants to share business logic between applications running on Windows, Linux, and macOS. Which .NET feature most directly supports this requirement?

  22. Question 22 of 60 Introduction to .NET and its features Medium

    A C# application creates many temporary objects while processing requests. Which .NET feature automatically reclaims memory occupied by objects that are no longer reachable?

  23. Question 23 of 60 Difference between .NET Framework, .NET Core and .NET Medium

    A company is starting a new cross-platform web service and wants the currently unified, actively developed .NET platform. Which platform should it choose?

  24. Question 24 of 60 Difference between .NET Framework, .NET Core and .NET Medium

    An existing application depends heavily on ASP.NET Web Forms and Windows-specific .NET Framework libraries. Which migration decision is most appropriate initially?

  25. Question 25 of 60 .NET SDK and Runtime Medium

    A production server only needs to execute a framework-dependent .NET application and will never compile source code. What is the minimum appropriate installation?

  26. Question 26 of 60 .NET SDK and Runtime Medium

    A developer can run an existing .NET application but receives an error that the dotnet new command is unavailable. What is the most likely cause?

  27. Question 27 of 60 Common Language Runtime (CLR) Medium

    A C# project is compiled successfully, but its methods have not yet been translated into native processor instructions. What form is the compiled code typically in?

  28. Question 28 of 60 Common Language Runtime (CLR) Medium

    When a managed .NET method is called for the first time, which CLR component commonly translates its intermediate code into native machine code?

  29. Question 29 of 60 .NET Class Library Medium

    A developer needs to read a text file without writing operating-system-specific file access code. Which .NET class library type is the most appropriate starting point?

  30. Question 30 of 60 Setting up development environment using Visual Studio and VS Code Medium

    A developer is configuring VS Code for C# development on Linux. Which combination provides the essential compiler tools and editor language support?

  31. Question 31 of 60 Introduction to .NET CLI and commonly used CLI commands Medium

    A developer wants to create a console project named InventoryApp in a new directory. Which command performs this task?

  32. Question 32 of 60 Introduction to .NET CLI and commonly used CLI commands Medium

    A cloned project references several NuGet packages, but the package files are not available locally. Which command explicitly downloads the required dependencies?

  33. Question 33 of 60 Project structure in .NET applications Medium

    A developer needs to change a console application's target framework and enable nullable reference type analysis. Which file should be edited?

  34. Question 34 of 60 Project structure in .NET applications Medium

    After compiling a .NET project, a developer sees bin and obj directories. Which description correctly distinguishes them?

  35. Question 35 of 60 NuGet Package Manager Medium

    A project requires the Newtonsoft.Json library, and the developer wants the dependency recorded in the project file. Which command should be used?

  36. Question 36 of 60 NuGet Package Manager Medium

    Two developers restore the same project and should receive the same dependency graph when package versions have not changed. Which generated file helps NuGet use the resolved dependency information?

  37. Question 37 of 60 Building and executing .NET applications Medium

    A developer has already built a project and wants to run it without triggering another build. Which command is most appropriate?

  38. Question 38 of 60 Introduction to C# Medium

    A C# variable declared as int count = 5; must later store the value 5.75. Which change best preserves the fractional part?

  39. Question 39 of 60 C# program structure Medium

    Consider a traditional C# console application containing several classes. Which method signature can serve as its entry point?

  40. Question 40 of 60 Introduction to Git and GitHub for source code management Medium

    A developer has modified Program.cs and wants to create a local Git snapshot before sending it to GitHub. Which command sequence is correct?

  41. Question 41 of 60 Introduction to .NET and its features Hard

    A team needs to run the same application on Windows and Linux while preserving managed memory, type safety, asynchronous programming support, and access to a large standard library. Which .NET characteristic most directly enables this combination?

  42. Question 42 of 60 Difference between .NET Framework, .NET Core and .NET Hard

    An existing ASP.NET application depends on System.Web and must remain hosted on IIS in a Windows-only environment. Which migration choice has the lowest compatibility risk?

  43. Question 43 of 60 .NET SDK and Runtime Hard

    A deployment server must execute a framework-dependent application but must not compile, restore, or create new projects. Which installation is normally sufficient?

  44. Question 44 of 60 Common Language Runtime (CLR) Hard

    A C# method allocates objects repeatedly, and no explicit deallocation occurs. Which CLR responsibility most directly prevents unreachable managed objects from remaining indefinitely in memory?

  45. Question 45 of 60 Common Language Runtime (CLR) Hard

    Two libraries written in different .NET languages exchange objects through public methods. Which CLR feature most directly makes this interoperability possible?

  46. Question 46 of 60 .NET Class Library Hard

    A project targets a modern .NET version and needs file access, collections, JSON serialization, and networking. Why can it use these APIs without implementing operating-system-specific versions of each feature?

  47. Question 47 of 60 Setting up development environment using Visual Studio and VS Code Hard

    A developer can open a C# file in VS Code but receives unresolved project references and cannot run dotnet build. Which diagnosis is most accurate?

  48. Question 48 of 60 Setting up development environment using Visual Studio and VS Code Hard

    A Visual Studio solution opens successfully, but a web project lacks debugging support and cannot start with its expected profile. What is the most likely setup issue?

  49. Question 49 of 60 Introduction to .NET CLI and commonly used CLI commands Hard

    A developer wants to verify that a project compiles without producing output binaries in its normal output location. Which command best matches that intent?

  50. Question 50 of 60 Introduction to .NET CLI and commonly used CLI commands Hard

    A CI job must run an already-restored project and fail if a build is implicitly required. Which command expresses that requirement?

  51. Question 51 of 60 Project structure in .NET applications Hard

    A project file contains a PackageReference, and the project has a Program.cs file but no manually maintained list of every source file. Which explanation is correct for modern SDK-style projects?

  52. Question 52 of 60 Project structure in .NET applications Hard

    A project targets net8.0 and references a package that supports only net6.0. What is the most important compatibility question before assuming the reference will work?

  53. Question 53 of 60 NuGet Package Manager Hard

    A package reference is added to a project file, but a clean build on another machine fails because the package cannot be found. Which action is normally required before compilation?

  54. Question 54 of 60 NuGet Package Manager Hard

    A project uses a package version range, and two developers restore it at different times and receive different transitive dependency versions. Which practice most directly improves reproducibility?

  55. Question 55 of 60 Building and executing .NET applications Hard

    A framework-dependent application is built on one machine and copied to another machine that lacks the required target runtime. What is the expected result when it is executed?

  56. Question 56 of 60 Building and executing .NET applications Hard

    A team wants a deployment artifact that can run on a target machine without requiring that machine to have the corresponding .NET runtime installed. Which approach is appropriate?

  57. Question 57 of 60 Introduction to C# Hard

    A method receives a string parameter and assigns a new string to that parameter. The caller's variable still refers to the original string. Which language behavior explains this result?

  58. Question 58 of 60 Introduction to C# Hard

    A nullable reference type warning appears when a value obtained from configuration is assigned to a non-nullable string. What does the warning primarily indicate?

  59. Question 59 of 60 C# program structure Hard

    In a modern console project, a developer adds top-level statements and also declares a conventional static void Main() method. The project fails to compile. What is the most likely reason?

  60. Question 60 of 60 C# program structure Hard

    A file-scoped namespace declaration is followed by a second namespace declaration in the same file. Why is this invalid?

That's unit 1

Answer a few questions and your score shows up here.