HCLTech
Deloitte Interview Questions and Answers
Q1. What is serialisation in API
Serialisation in API is the process of converting data into a format that can be easily transmitted over a network.
Serialisation is used to convert complex data structures into a format that can be easily transmitted over a network.
It involves converting objects or data structures into a stream of bytes that can be sent over a network.
JSON and XML are commonly used formats for serialising data in APIs.
Serialisation is important for ensuring data consistency and interoperabili...read more
Q2. What is MVVM architecture
MVVM is an architectural design pattern that separates the user interface code from the business logic and data model.
MVVM stands for Model-View-ViewModel
Model represents the data and business logic
View displays the UI elements and interacts with the user
ViewModel acts as a mediator between the Model and View, handling user inputs and updating the Model
MVVM helps in achieving separation of concerns and making the code more modular and testable
Q3. What is codable
Codable is a protocol in Swift that allows for easy encoding and decoding of data types to and from external representations.
Codable protocol is used to convert custom data types to and from external representations such as JSON, plist, etc.
It requires the types to conform to Encodable and Decodable protocols.
Codable protocol provides default implementations for encoding and decoding.
Example: struct Person: Codable { var name: String }
Example: let jsonData = try JSONEncoder()...read more
Q4. what is GCD and Multitreadung
GCD stands for Grand Central Dispatch, a technology used in iOS for managing concurrent operations. Multithreading is the ability of a CPU to execute multiple threads concurrently.
GCD is used for managing tasks asynchronously and efficiently utilizing system resources.
Multithreading allows multiple tasks to run concurrently, improving performance and responsiveness of an application.
Example: Using GCD to download images in the background while the main thread remains responsi...read more
Q5. Class struct difference
Classes are reference types, while structs are value types in Swift.
Classes are reference types, meaning they point to the same instance in memory when assigned to a new variable.
Structs are value types, meaning they create a new copy when assigned to a new variable.
Classes support inheritance, while structs do not.
Classes can have deinitializers, while structs cannot.
Example: class Person { var name: String } vs struct Point { var x: Int, y: Int }
Q6. diff b/w diff and guard
diff is used to compare two collections and return the differences, while guard is used for early exit in a function if a condition is not met.
diff is a method used in Swift to compare two collections and return the differences.
guard is a keyword used in Swift to provide an early exit from a function if a condition is not met.
Example: let array1 = [1, 2, 3, 4], array2 = [3, 4, 5, 6]; let result = array1.diff(array2) // result = [1, 2]
Example: guard let value = optionalValue e...read more
Top IOS Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month