Location: India
Date: 17-Mar-2022
- What is constructor
- Difference between swift and obj c and which is better?
- Difference between classes and structure, which will require more memory?
- What are execution states?
- What is stack view?
- Difference between guard let and if let()?
- What is Tagging?
- How to test accessibility in Xcode?
- About json and API.
- What is super init() and init()?
- What is tuple?
- What is set?
- Difference between tuple and set.
- Difference between background state & inactive state?
Location : India
Date : March, 2021
Date : March, 2021
- Difference between Swift and Objective C.
- What is protocol oriented languages?
- Difference between OOPS and POPS ?
- What are higher order function?
- Difference between map and flat map?
- What is compact map?
- Difference between MVC and MVVM.
- What is optional?
- What is optional binding?
- Difference between if let and guard let.
- What are application states?
- How to run our application continuously running in the background?
- What is lazy?
- What is weak and unowned?
- Difference between KVO and Delegate.
- What are solid principles?
- Difference between GCD and OperationQueue?
- Difference between escaping and non-escaping closure.
- What is codable?
- How to upload your own framework to cocoapods?
- How can you move from 4 commits to one commit?
- What is git squash?
- What is rebase in git?
- Difference between management and leadership skill.
Location: Bangalore
Date: March, 2021
- What are application states?
- Can you co-relate app delegate methods with app states?
- Difference between Strong and Weak.
- Difference between Class, Structure, Enum.
- What is protocol-oriented program?
- What is optional binding in Swift?
- What are constraints?
- What are map and compact map?
- Difference between compact map and Flat map
- How to switch from background queue to main queue?
- What is a serial queue?
- What is a concurrent queue?
- How agile methodology works?
- Why you use FCM notification instead of APNS?
I have attended to the technical interview for TCS, the questions that they have asked is:
ReplyDelete1. what is constructor
2. diff b/w swift and obj c, which is better
3. diff b/w classes and structure, which will require more memory
4. what are execution states
5. what is stack view
6. diff b/w guard let and if let()
7. what is Tagging
8. how to test accessibility in xcode
9. about json and API
10. what is super init() and init()
11. what is tuple
12. what is set , diff b/w tuple and set
13. diff b/w background state & inactive state
14. code for orientation
1. What is constructor?
DeleteA constructor in Swift is the init() method. It's used to initialize an object’s properties when the object is created.
2. Difference between Swift and Objective-C, which is better?
Swift: Modern, safer, faster, clean syntax, type-safe.
Objective-C: Old, more verbose, dynamic.
✅ Swift is better for new projects due to better performance and safety.
3. Difference between classes and structures, which uses more memory?
Class: Reference type, supports inheritance.
Struct: Value type, copied on assignment.
✅ Classes generally use more memory due to reference counting and heap allocation.
4. What are execution states?
App lifecycle states:
Not Running
Inactive
Active
Background
Suspended
These define what the app is doing or not doing in memory.
5. What is stack view?
A UIStackView arranges subviews in a horizontal or vertical stack, managing layout automatically with spacing, alignment, and distribution.
6. Difference between guard let and if let?
if let: Optional unwrapping inside a block.
guard let: Unwraps and exits early if nil. Used for early return and cleaner code.
✅ Use guard when you want to exit early on failure.
7. What is Tagging?
Assigning a tag (Int) to a UI element (e.g., button) to identify it uniquely, especially in loops or actions.
8. How to test accessibility in Xcode?
Use Accessibility Inspector tool.
Enable VoiceOver or run UI tests with accessibility identifiers.
Set accessibilityLabel, accessibilityIdentifier in code.
9. About JSON and API?
JSON: Lightweight data format used for data exchange.
API: A way apps communicate with backend services.
You parse JSON from API using Codable in Swift.
10. What is super.init() and init()?
init(): Initializes current class.
super.init(): Calls parent class initializer in subclass to ensure proper setup.
11. What is Tuple?
A group of multiple values combined into a single compound value.
let person = (name: "John", age: 30)
12. What is Set? Difference between Tuple and Set?
Set: Unordered collection of unique values.
Tuple: Fixed number of values of possibly different types.
✅ Set is used for uniqueness; Tuple for grouping.
13. Difference between Background and Inactive state?
Background: App is running but not on screen.
Inactive: App is in foreground but not receiving events (e.g., phone call alert).