Deloitte Interview Questions

Ranjit
2 min readMar 6, 2019

1)Swap two number without having a 3rd variable?
2)Write a Program for Palindrome?
3)How can you call threads in a different order or calling one by one in the best approach?
4)What is the difference between Struct vs Enum?
5)What is the DataType of Array in Swift? And If it is fixed size then, how the size is getting increased?
6)If Parent Entity deleted in CoreData, then Child also should get deleted how I can achieve?
7)What is the difference between Open and Public and FilePrivate and Private?
8)Explain to me the MVVM in sample Program?
9)What is Strong? What is Weak? Why we want to use UnOwned and weak self
10)How we can read and write from the Same Entity in Parallel using CoreData? Is CoreData ThreadSafe?
11)Have you used Two ManagedObjectContexts?
12)What is the result of this Program
[1,2,3].map{$0+$0}
13)What is the Final Keyword does and Tell me the result of the following program?
Final class A: NSObject{
func callme() {
print(“Class A called“)
}
class B: A {
Func callme() {
print(“Class B called“)
}
}
Let b:A = B()

14)What is the difference between Category vs Extension?
15)How we can create Protocol function as optional in Swift?
16)How to distribute the space between the views in Storyboard without using any code? Avoid StackViews and ContainerViews any other way?
17)In Portrait one label should be in x:50,y:50 but the same label in a landscape in the bottom. Here how can you able to achieve without using any code? Any idea how can you able to achieve in Storyboard?
18)Explain the MVC?
19)Explain the Delegate pattern using Class vs Struct?
20)Have worked on GIT?
21)What is the best way to approach the Memory hike or leaks?
22)What is the difference between GCD vs Operation Queue?

--

--