C# Programming Interview Preparation Guide

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Challenging Project

One of the most challenging projects I worked on was my Fortnite Stats Analyzer website, which used the Fortnite API to fetch and analyze player stats. One major challenge was a background display issue. After thoroughly reviewing my C#, CSS, HTML, and JavaScript, I found my code was completely accurate, leading me to discover that a Chrome dark mode extension was interfering with the UI. This reinforced the importance of considering external factors when troubleshooting. Through this project, I strengthened my skills in web development via ASP.NET Core MVC, improved my debugging process, and learned to present data effectively.

Personal Goal Accomplishment

One personal goal I accomplished this year was building my Fortnite Stats Analyzer website while progressing through my coding bootcamp and working 32 hours per week. I applied a multitude of coding skills to create a functional and insightful project.

using directive

Purpose: Includes namespaces to make classes and methods available. Scope: Applies to the entire file. Used For: Bringing namespaces into scope.

Asynchronous Programming

What? - Code that runs without blocking execution. Why? - Improves performance, handles tasks like API calls & timers efficiently. Key tools: Callbacks, Promises, Async/Await.

When should you add an index to a database column? What is the cost of a database index?

When you want to read from the database faster. The cost is that it takes more time to write information to the database.

What is the advantage of using a reference type over a value type?

___ Types (Classes) 1. Can grow or shrink in memory allocation. 2. Support inheritance (can derive from other classes) ___ Types (Structs) 1. Fixed memory size (cannot grow/shrink dynamically). 2. Cannot inherit from other structs or classes. - Structs can conform to interfaces but not inherit from other structs or classes

Explain what an ORM does?

___ is a software abstractor that is used to access a relational database from an object-oriented language. Objects in OOP Language (Code) -> ORM (Translator) -> Relational Database (SQL Tables)

using statement

ensures that IDisposable objects are disposed of once they are no longer needed.

Instance Method

instanceOfAClass.MethodName()

Difference between (1) constant and (2) readonly

(1) These are declared and initialized at compile time, and their value can't be changed afterward. (2) Is used only when we want to assign the value at run time.

Advantages and Disadvantages of (1) microservices. What is the advantage of the (2) monolith application?

(1) ___ Advantages: These are isolated to a very specific purpose. Very easy to write, test, and enhance. Very laser targeted. One sole purpose. (2) ___ Advantage: No need for a transmission layer, reducing overhead from repeatedly sending and receiving JSON

(1) Classical Inheritance vs (2) Prototypal Inheritance

(1) ___ ___ - Uses classes & objects, follows a strict hierarchy. (2) ___ ___ - Uses object cloning, more flexible & dynamic. C# uses (1) ___ ___!

Explain the difference between an (1) instance method and a (2) class/static method.

(1) applies to an instance of the class (i.e. an object), whereas (2) applies to the class itself. In C# a class method is marked static. Methods and properties not marked static are instance methods.

(1) GET vs (2) POST HTTP request

(1) fetches data, URL visible, fast but not secure. (2) sends data, hidden body, secure but slower. (1) = Read (2) = Send Securely

(1) Promise vs (2) Callback

(1) manages async tasks with .then() & .catch(), making code cleaner. (2) is a function passed into another, can lead to callback hell. 1. improves readability & avoids nesting!

What is fault tolerance?

Allows a system to function despite component failures or faults. Ex: If one server in a network fails, another takes over automatically. Key Concept: Redundancy & backups ensure no single failure stops operations.

Polymorphism

Allows different classes to be referenced or called in a similar way, even with different implementations.

Instance

An object that is an instance of a class or type.

What is .NET Core?

An open-source, general-purpose development platform for creating apps for Windows, macOS, and Linux.

What do we do?

An opener question to gauge a candidate's understanding of the business and their engagement within the industry.

One-day Seminar Question

Asking candidates what subject they would choose for a seminar to assess their commitment to ongoing learning and teaching.

Disagreement over Requirements

At my gas station job, I proposed automating register counting to improve efficiency, but a coworker insisted manual counting was more reliable. I built a prototype to demonstrate its accuracy, and after seeing the results, he agreed to use it. This experience reinforced the value of data-backed solutions, practical demonstrations, and addressing concerns to find common ground.

Class / Static Method

ClassName.MethodName()

Self-Introduction

Combining professional identity and personal attributes to explain why the candidate is a good fit for the role.

Opinionated Engineers

Engineers who use data and well-reasoned arguments to advocate for their beliefs while knowing when to defer discussions.

Difference between HTTP & HTTPS

HTTP: - No encryption - Not secure - No authentication - Lower SEO ranking HTTPS: - Encrypted (SSL/TLS) - Secure & protected - Verified identity - SEO boost

Encapsulation

Hides unnecessary details, exposing only essential functionality (like a car's steering wheel & pedals, while hiding the engine & transmission).

Favorite Web Platform

I use ChatGPT daily, tailoring it to my identity, achievements, and goals. It helps me find innovative solutions to modern problems, keeping me engaged. AI feels limitless, and in 1.5 years, it has dramatically expanded my mind.

Tell me about yourself.

I'm a dedicated and detail-oriented software developer with a strong background in C#, Python, and web development. I recently completed a coding bootcamp, where I built projects like a Fortnite Stats Analyzer website that leverages an API for data analysis and gives dynamic feedback for players. I have a strong problem-solving mindset, demonstrated by my ability to: 1. Debug complex issues 2. Optimize code 3. And having achieved a perfect score on a calculus exam back in college. I also have experience tutoring others in computer science, which has strengthened my ability to break down complex concepts.

What are the 4 pillars of object-oriented programming?

Inheritance - A child class inherits functionality from a parent class. Polymorphism - Allows different classes to be referenced or called in a similar way, even with different implementations. Encapsulation - Hides unnecessary details, exposing only essential functionality (like a car interior vs under the hood). Abstraction - Separates concerns by breaking software into modular, reusable sections rather than tightly coupled code.

Static readonly fields

Initialized when an instance is created or a static method runs. Must be set before the static constructor finishes. Avoid [ThreadStatic] since it causes uninitialized values in other threads.

What is a Delegate?

It "points" to a method with a matching signature. You can swap out methods easily, just like changing the channel. When you "press the button" (invoke it), the assigned method runs. Delegate = Remote -> Sends command -> Runs the right method

What is an abstract class?

It is intended to be a base class of other classes. It acts as a template for its derived classes. ___ ___ Features: 1. Cannot be instantiated 2. May contain abstract methods & accessors 3. Non-abstract subclasses must implement all abstract methods

MVC

Model View Controller

Readonly instance fields

Must have set value by the time constructor exits. Evaluated when a new instance is created.

Favorite App Question

My favorite app is Brilliant because it helps me sharpen my problem-solving skills in math, logic, and computer science. I've used it to improve my understanding of algorithms, data structures, and AI concepts through interactive challenges.

Namespace

.NET uses a ___ to organize large code projects and the many classes in .NET.

Constants

1. Are static by default. 2. Could be declared within functions. 3. Are copied into every assembly that uses them (every assembly gets a local copy of values). 4. Can be used in attributes. 5. They must have a value at compilation-time (e.g. you can have 3.14 * 2, but cannot call methods).

What is C#?

A strongly and statically typed object-oriented programming language.

Inheritance

A child class inherits functionality from a parent class (parent/child relationship).

Explain what Dapper does

A lightweight ORM (Object Relational Mapper) for C# that helps interact with databases efficiently. It executes SQL queries and quickly maps the results to C# objects, reducing boilerplate code. Visual Understanding: C# Code (SQL Query) -> ___ (Fast Mapper) -> Database (SQL Data) Key Benefits: 1. Faster than Entity Framework 2. Simple & minimal code 3. Direct SQL execution with easy object mapping

What are you reading?

A non-technical question that provides insight into the candidate's personality and interests.

Adding Value to the Company

A question about how candidates will relate their strengths and achievements to the job requirements.

Leaving Previous Role

A question about the reasons for leaving a previous job, emphasizing the importance of not speaking negatively about past employers.

Understanding of the Role

A question asking candidates to identify four key points from the job description that they understand.

Salary Expectation

A question regarding the candidate's salary expectations, suggesting they check market averages.

Interest in the Company

A question requiring candidates to research the company and articulate four appealing points about it.

Research about the Company

A question to determine if the candidate has researched the company and can articulate their opinions about it.

Explain what a Class is in C#

A user-defined blueprint or prototype from which objects are created.

Explain REST / RESTful Services

REST (Representational State Transfer) is an architecture for web services that allows systems to communicate over the internet using stateless requests. Key Features: 1. Stateless (independent) 2. Interoperable (works with different languages) 3. Fast & Reliable Common HTTP Methods: GET - Retrieve data POST - Send new data PUT - Update data DELETE - Remove data

Write a SQL expression for the following diagram (Everything in A that is not in B).

SELECT * FROM A LEFT JOIN B on B.A_ID = A.ID WHERE B.A_ID IS NULL;

You have a table called drivers and a table called orders. Orders are delivered by drivers. In this way, the orders belong to a driver through the column orders.driver_id. Write a SQL expression that gets all the drivers that have delivered an order.

SELECT * FROM drivers INNER JOIN orders on orders.driver_id = driver.id

Abstraction

Separates concerns by breaking software into modular, reusable sections rather than tightly coupled code.

JavaScript Function Block

Significance - Creates a private scope, avoiding global variable conflicts. Reason - Keeps variables/functions local, improving security & modularity.

Explain the Web to a Kid

The Web is like a giant library, but instead of walking to a building, you use a computer or phone to explore it. Typing in Google is like asking a super-fast librarian to find the right book. Websites are pages in a giant storybook, and the internet brings them to your screen. It's a magical library where you can learn, play, and explore endlessly!

Complex Problem Simplification

The ability to boil down a very complex problem into simple, clear language, indicating clear thinking and effective communication.

Abstract Classes

These can provide some implementation but cannot be instantiated directly.

Interfaces

These define a contract that classes can implement, allowing for multiple implementations.

Access Modifiers

These define the visibility of classes and class members, controlling access from other classes.

Continue Keyword

This skips the current iteration of a loop and proceeds to the next iteration.

Difference between (1) ref and (2) out

This tells the compiler that the object is initialized before entering the function This tells the compiler that the object will be initialized inside the function. So while (1) is two-ways, (2) is out-only

Break Keyword

This terminates the nearest enclosing loop or switch statement.

Write a function that accepts an array of numbers and returns the greatest number.

public int FindMax(int[] numbers) { if (numbers == null || numbers.Length == 0) throw new ArgumentException("Array must not be null or empty"); return numbers.Max(); }


Kaugnay na mga set ng pag-aaral

MCAT Biology Questions & Concepts

View Set

complete the sentences using the correct word: mujer, chicos, hombre, chic, pelo

View Set

(Micro) Chapter 20- Infectious Diseases Affecting the Gastrointestinal Tract

View Set

Chapter 12 Consideration (B-Law) LEARNING INFO

View Set

"Rad Review - 4.1 Image Acquisition and Technical Evaluation (282)"

View Set