Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
200 views

Intrebari Interviu Programator

The document discusses key concepts in object-oriented programming (OOP) like classes, access modifiers, constructors, structs vs classes, inheritance, polymorphism, abstraction, interfaces, and more. It also covers topics in .NET like the common language runtime (CLR), just-in-time (JIT) compilation vs native image generation (NGEN), assemblies, the global assembly cache (GAC), and value vs reference types. Finally, it addresses SQL concepts such as stored procedures, views, connections/pooling, datasets vs data readers, keys, errors, and indexing.

Uploaded by

ionel stefanuca
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
200 views

Intrebari Interviu Programator

The document discusses key concepts in object-oriented programming (OOP) like classes, access modifiers, constructors, structs vs classes, inheritance, polymorphism, abstraction, interfaces, and more. It also covers topics in .NET like the common language runtime (CLR), just-in-time (JIT) compilation vs native image generation (NGEN), assemblies, the global assembly cache (GAC), and value vs reference types. Finally, it addresses SQL concepts such as stored procedures, views, connections/pooling, datasets vs data readers, keys, errors, and indexing.

Uploaded by

ionel stefanuca
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

OOP

1. What is a class?

2. What is Public/Private/Protected/Internal access modifier?

3. What is the default access modifier of a class?

4. What is a constructor?

5. What is the difference between a struct and a class?

6. What is abstract method?

7. What is abstract Class?

8. What is virtual method?

9. What is polymorphism?

10. What is static field?

11. What is static Method?

12. What is a singleton?

13. What is new modifier?

14. What is sealed modifier?

15. What is an interface?

16. When to use Interface over abstract class?

17. What is method overloading?

18. What is encapsulation?

19. In what scenarios will you use a abstract class and in what scenarios will you use a interface?

1
20. What is the difference between override Foo () and new Foo () in the following example:

public class BaseClass {

public virtual void Foo()

Console.WriteLine("Foo BaseClas");

public class DerivedClass : BaseClass

public override void Foo ()

Console.WriteLine("Foo DerivedClass");

BaseClass c = new DerivedClass();

c.Foo(); //What is the output? Which will be the output if override is replaced by "new"?

21. What is a private constructor? Where will you use it?

2
.NET
1. How would you define the .NET framework?

2. How is source code executed in .NET?

3. What is the JIT? What is NGEN? What are limitations and benefits of each?

4. Does JITting occur per-assembly or per-method? How does this affect the working set?

5. What is the difference between an EXE and a DLL?

6. How is a strongly-named assembly different from one that isnt strongly-named?

7. What is the GAC? What problem does it solve?

3
C#
1. What would be the output of the following code:
public class BaseClass {
public virtual void Display() {
System.Console.WriteLine(BaseClass: Display);
}
}

public class DerivedClass : BaseClass {


public void Display() {
System.Console.WriteLine(DerivedClass: Display);
}
}

public class Program {


public static void Main() {
BaseClass b;
b = new BaseClass();
b.Display();

b = new DerivedClass();
b.Display();
}
}

2. What is the base class of all classes?

3. In the context of a comparison, what is object identity vs. object equivalence?

4. What is the difference between a value type and a reference type?

5. What is boxing?

6. What "immutable" means? Give an example.

7. What is the difference between System.String and System.Text.StringBuilder?

8. What are Generics?

9. What is a delegate? What is an event?

4
10. What is an anonymous method? What is a lambda expression?

11. What is an expression tree?

12. What is an extension method?

13. What is an anonymous type? When would you use an anonymous type?

14. What is LINQ?

15. What is the difference between var and dynamic?

16. What is the difference between:


catch(Exception e) {
throw e;
}

and

catch(Exception e) {
throw;
}

17. In the try/catch/finally the finally block is called even an exception occurs?

18. Explain whats happening in the first constructor:


public class MyClass {
public MyClass(string a) : this() {

}
public MyClass() {

}
}

How is this construct useful?

19. What is Reflection?

20. Can DateTimes be null?

21. Whats wrong with a line like this? DateTime.Parse(myString);

5
22. What is Garbage Collection and how does it work?

23. How is the using() pattern useful? What is IDisposable? How does it support deterministic
finalization?

24. What is cyclomatic complexity and why is it important?

25. What is a singleton?

26. The following method gives different results when run multiple times. Why?
private static int CalculateTotal(){
int total = 0;

Parallel.For(0, 100*1000, delegate(int i){


total += i;
});

return total;
}

27. What is the difference between a Debug and Release build? Is there a significant speed
difference? Why or why not?

28. Explain current thinking around IClonable.

29. Do you use Unit Testing?

30. Describe the difference between a Thread and a Process?

31. What is a Windows Service and how does its lifecycle differ from a "standard" EXE?

32. What S.O.L.I.D. acronym means?

33. What is an OR/M and what problem does it try to solve?

34. How would you implement caching in a .NET application?

35. How would you store passwords in a .NET application?

6
SQL
1. Would you use in-line queries or stored procedures? Why?

2. When should you use Views?

3. What is a SqlCommand object?

4. What is connection pooling?

5. Would you use DataSets in a web application? Why or why not?

6. What is the difference between using DataReaders and DataSets?

7. What is the importance of primary keys and foreign keys in a SQL Server OLTP database design?

8. What is an identity? What is the value? How can you capture the last identity value per column?

9. What is difference between Scope_Identity() and @@Identity

10. How do you code error handling logic in your stored procedures?

11. Name 3 or more aggregate functions and the value they provide in your coding.

12. Can tables be over indexed? What are the performance implications?

You might also like