Capgemini
10+ FADD Studio Interview Questions and Answers
Q1. What’s difference between class and structure
Classes and structures are both used to define custom data types, but they have some key differences.
Classes are reference types, while structures are value types.
Classes support inheritance, while structures do not.
Classes have deinitializers, while structures do not.
Classes have reference counting for memory management, while structures do not.
Classes can have optional property types, while structures cannot.
Q2. What’s retain cycle how you can avoid
Retain cycle is a memory management issue where objects reference each other and cannot be released. It can be avoided by using weak or unowned references.
Retain cycle occurs when two or more objects hold strong references to each other.
To avoid retain cycle, use weak or unowned references instead of strong references.
Weak references do not increase the reference count of an object and automatically become nil when the object is deallocated.
Unowned references are similar to w...read more
Q3. What is closure? Life cycle of escaping closure?
A closure is a self-contained block of code that can be passed around and used in your code. An escaping closure is a closure that is called after the function it was passed to has returned.
Closure is a block of code that can be passed around and used in your code.
Escaping closure is called after the function it was passed to has returned.
Example: Using a completion handler in a network request to handle the response after the request has finished.
Q4. Difference between GCD and operation Queues
GCD and Operation Queues are both used for concurrent programming in iOS, but differ in their approach.
GCD is a C-based API that uses a thread pool model for concurrency.
Operation Queues are built on top of GCD and provide a higher-level abstraction for concurrency.
GCD is best for simple, lightweight tasks, while Operation Queues are better for more complex tasks with dependencies.
GCD uses blocks for task execution, while Operation Queues use Operation objects.
GCD has a lower...read more
Q5. Explain the Life cycle of iOS applications
The life cycle of iOS applications refers to the stages an app goes through from launch to termination.
The app is launched by the user or system
The app enters the foreground and becomes active
The app can be sent to the background or suspended
The app can be terminated by the user or system
The app can be resumed from the background or suspended state
The app can receive memory warnings and handle them appropriately
Q6. Explain the life cycle of UIviewController
The UIViewController life cycle consists of several stages that occur when the view controller is loaded and unloaded.
viewDidLoad() - called when the view controller's view is loaded into memory
viewWillAppear() - called just before the view appears on the screen
viewDidAppear() - called just after the view appears on the screen
viewWillDisappear() - called just before the view disappears from the screen
viewDidDisappear() - called just after the view disappears from the screen
de...read more
Q7. Write code to get distinct members in array with same sequence
Use a Set to get distinct members in array while maintaining sequence.
Iterate through the array and add each element to a Set to automatically remove duplicates.
Create a new array by iterating through the Set to maintain the original sequence.
Q8. What’s opinion binding
Opinion binding is a legal doctrine that requires judges to follow the decisions of higher courts in similar cases.
Opinion binding is also known as stare decisis.
It helps to ensure consistency and predictability in the legal system.
For example, if a higher court has already ruled that a certain law is unconstitutional, lower courts must follow that ruling in similar cases.
Opinion binding can be controversial, as it can prevent judges from correcting past mistakes or adapting ...read more
Q9. What is multi threading?
Multi threading is the ability of a CPU to execute multiple threads concurrently, allowing for improved performance and responsiveness in applications.
Allows for parallel execution of tasks, improving performance
Enables applications to remain responsive while performing intensive tasks
Can lead to synchronization issues if not managed properly
Q10. difference between let and var
let is used for constants that do not change, var is used for variables that can change
let is used for constants that do not change
var is used for variables that can change
let variables cannot be reassigned once they are set
var variables can be reassigned multiple times
Q11. Define Operation queue
Operation queue is a way to manage and execute tasks asynchronously in iOS applications.
Operation queue allows you to add tasks (operations) to a queue and execute them in the background.
It provides control over the execution of tasks, such as setting dependencies between tasks.
Operations can be added to the queue with different priorities, allowing for better task management.
Example: NSOperationQueue is a class in iOS that represents an operation queue.
Q12. Define optionals in swift
Optionals in Swift are used to represent a value that may or may not exist.
Optionals are denoted by adding a question mark (?) after the type declaration.
They can either contain a value or be nil.
Optionals must be unwrapped before using their value to avoid runtime errors.
Optional binding and optional chaining are commonly used with optionals.
More about working at Capgemini
Interview Process at FADD Studio
Top IOS Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month