Placement Papers for All Companies

3i infotech
Abacus Infotech
Abatix
Abaxis
ABB
ACC Limited
Accel Frontline
Accenture
Aditi Technologies
Adobe System
ADP
Agilysys
AgreeYa
AIG
AirNet
Alanco Technologies
Alle Technologies
Allfon
Alter Systems
Amazon
AMDL
Amdocs
AMI
Amiti Software Technologies
ANZ
Apple
Applied Materials
Apps Associates
Aricent
ASDC
Ashok Leyland Ltd
Asian Paints
Aspire System
AT & T
Atlas Copco
Atos Origin
AXA Technology Services
Axes Technology
Bain
Bajaj
Bayer
Bharti Airtel Ltd
Bhawan Cybertek
Birlasoft
Blue Star Infotech
BMC
BOB
Brakes India
C-DOT
CA Technologies
Cadence
Calsoft
Canarys
Capgemini
Caterpillar
Celstream
CGI Group
Changepond Technologies
Cimtrix Systems
Cisco system
Citicorp Overseas Software Ltd
ClinTech
CMC Limited
CMS
Cognizant
Compaq
Consagous Technologies
Convergys
CORDYS
CRISIL
Crompton Greaves
CSC
CSFB
CtrlS Datacenters Ltd
Cummins
Cyient
Daffodil
Daimler
Dell
Deloitte
Delphi-TVS
Dharma Systems
Directi
DSRC
Eicher
ELGI
ELICO
EMC Corporation
Emphasis
Ericsson
Ernst & Young
ESKO
Essar
Facebook
Fanuc Corporation
Fidelity
Flextronics
Flipkart
Freescale
Fujitsu
Gajshield
GE
Genpact India
Geodesic
Geometric Limited
GlobalEdge
GlobalLogic
GMR Group
Godrej Infotech
Google
Grapecity
Harita - TVS
HCL
HCL Technologies
Headstrong
Healthasyst
HEC Ltd
Hexaware
HFCL
Holool
Honeywell
HP
HTC Global Services
Huawei
Hughes
Hyundai
IBM
IBS Software Services
IGate
Ikanos
IKOS
Impetus
iNautix
Indecomm
IndiaBulls Power Limited
Inductis-EXL
Industrial Alliance
Infineon
Infogain
Infosys
Intec
Integra
Intel
Intergraph
ITC Infotech
Jindal Steel and Power Limited
KPIT
L & T
L & T Infotech
LG Soft
Linde India Ltd
LnT Emsys
LnT-ECC
Lucas - TVS
Mahindra Engineering Services Ltd
Mahindra Ltd
Maruti
Matrix
Maveric Systems
McAfee
Microland
Microsoft
Mindtree
Miraclesoft
MKCL
Motorola
Mu-Sigma
Nagarro
NASSCOM
NCR Corporation
Ness Technologies
Neudesic
NIIT Technologies
Novell
Nvidia
Oracle
Persistent
Philips
Planetasia
Polaris
Poornam Info Vision
PSI Data Systems Limited
Quest-Global
Quinnox
R Systems
Redpine
Reliance Energy
Robert Bosch
RS Software
Samsung
SAP labs India
Sapient
Sasken Communications
Schneider India
Serco
Siemens
Sierra Atlantic
SkyTECH
Soliton
Sonata Software
Sony India
SQL Star
Steria
Subex Limited
Sutherland Global Services
Syntel
Talisma
Tata motors
Tata technologies
Tata-ELXSI
TCE
TCS
Tech Mahindra
Temenos
Tesco
Texas Instruments
Thermax
ThoughtWorks
Torry Harris
Triad
Trianz
Trilogy
TVS Motor
Unisys
UnitedHealth Group
UST Global
UTC Aerospace System
Valuelabs
Vedanta
Verifone
Verizon
Virtusa
Vision Infotech
Vizual
VMware
Wipro
Yahoo
YASH Technologies
Zenith
Zensar Technologies
ZTE

Apple Technical Interview Questions and Answers

Posted on :23-02-2016
Apple Interview Questions and Answers - Set 2:-

Q1. Explain does iOS support multitasking?

ANS:
iOS 4 and above supports multi-tasking and allows apps to remain in the background until they are launched again or until they are terminated.


Q2. Explain frame and bounds?

ANS:
The frame of a view is the rectangle, expressed as a location (x, y) and size (width, height) relative to the super view it is contained within. The bounds of a view is the rectangle, expressed as a location (x, y) and size (width, height) relative to its own coordinate system (0,0).


Q3. Define the location services?

ANS:
Applications such as Maps, camera and compass are allowed to use the information from cellular, Wi-Fi and Global Positioning System networks for determining the approximate locations.
The location is displayed on the screen, using a blue marker.


Q4. Explain iphone sdk?

ANS:
  1. iPhone SDK is available with tools and interfaces needed for developing, installing and running custom native applications.
  2. Native applications are built using the iPhone OSs system frameworks and Objective-C language and run directly on iPhone OS.
  3. Native applications are installed physically on a device and can run in presence or absence of network connection.


Q5. Design a chess game. Basics of a chess game was explained and a player could be human or AI?

ANS:
Follow-up questions:
* What are the main objects?
* How do the main objects interact with each other?
* Which object or objects own the current game state information?
* Implement the method to move a piece to another position on the board. method must communicate if the move is legal or not.
* How do you test the move piece method?

Chessboard: contains a matrix of chess pieces objects
Player: contains a list of references to his/her active chess pieces.
Chess piece: contains color or player, and what type of piece is it (tower, horse...)

boolean canMove(pieceType, start_x_pos, end_x_pos, start_y_pos, end_y_pos){
if (type equals horse){
canMoveHorse (pieceType, start_x_pos, end_x_pos, start_y_pos, end_y_pos);
}
else if (type equals horse){...}
...
}

test1: the piece is at the indicated position
test2: the piece has the same color at before it was moved
test3: if there was another piece at the end position, now it has been removed from the chessboard and from its players list
test4: if it is a queen, tower, ... check that before the movement there was not any other piece in the path
test5: check that the other pieces are at the same places where they were before the movement


Q6. What could be performance hits for searching on Local computer i.e. if you are searching computer for content what are the parameters you will consider for performance?

ANS:
  1. Think about file systems and other OS components.
  2. Not everything in computer is implemented using hast table.
  3. In case of spotlight if you see wiki the underlying data structure is B trees.
  4. Think in that direction what factor apart from B trees would be a performance hit.
  5. Hint: think about file systems.


Q7. Explain Differentiate between Google search and local computer search?

ANS:
Google search is global search engine based on outside information, local computer search is within computer area data or information search.


Q8. What is B trees and its applications?

ANS:
A B-tree is just another tree data structure mostly used within file systems and databases. Common file systems that use B-trees are HFS+ (OSX), ext4 (Linux) and NTFS (Windows).


Q9. Suppose if there are two threads in your app - T1 and T2. T2 has high priority. However, for some reason the priority decreases automatically. What could be the reason? How will you debug it? How will you fix it so that priority stays the same, no matter what?

ANS:
Poll after some constant time
If T1 has priority p always set T2 priority lesser then T1 that is p+1


Q10. Designed a similar API like malloc, which has a similar functionality. How do you test the API?

ANS:
1) Give a very large size(1000000000) and check if its able to allocate
2) Provide number values 1,3,0,100
3) Give a character in size to api
4) GIve blank spaces
5) NUll value for size field in api
6) Call the api from multiple sessions


Q11. Write a function:

char * CreateEmptyString(int len);

function should return an pointer to an empty string of length len

ANS:
char * setEmpty(int len){
if (0>len) return NULL;
char * c = (char *) malloc(len+1);
memset(c, 0, len+1);
return c;
}


Q12. Why an app on iOS device behaves differently when running in foreground than in background? 

ANS:
An application behaves differently when running in foreground than in background because of the limitation of resources on iOS devices.


Q13. How to design spotlight search feature in Mac OS?

ANS: B-tree or Hash Table


Q14. Which framework delivers event to custom object when app is in foreground? 

ANS:
The UIK it infrastructure takes care of delivering events to custom objects. As an app developer, you have to override methods in the appropriate objects to process those events.


Q15. How to test ios simulator? or How would you test an Android simulator?

ANS:
Two methods must be applied. First, the simulator must conform to the system specification for the hardware. Every instruction that retires must behave exactly as the hardware expects, including every result, and every control register. Unit tests can be written for these individual cases and used to maintain the simulator. Next, real world programs and applications should be ported to run on the simulator. Instrumentation code can be added to provide some kind of checksum section to ensure that the simulator is outputting results the same as hardware.


Q16. Which sorting algorithm you would like to implement as unix library and why?

ANS:
Quick sort for example is important because its average runtime is O(nlog(n)) and in most cases its better than other logarithmic algorithms (Merge Sort and Heap Sort). I would ask him though, why would you want to stop at implementing just one algorithm. How about an API that can use sort based on input size (strategy design pattern ); because for different values of n different sorting algorithms can be useful.


Q17. The producers write elements to a ring buffer(fixed size) while the consumers access elements from it. Implement a write and a read function using a producer pointer and consumer pointer. The consumer pointer cannot surpass the producer pointer and when the producer pointer reaches where it starts again, it stops?

ANS:
For multithreading, put mutex in write template

class writeandread
{
public:
writeandread(T* s, int n):start(s), writePtr(s),readPtr(s), maxbytes(n), numofeles(0) {}
T* getStartPtr(){return start;}
T* getwritePtr(){return writePtr;}
T* getreadPtr(){return readPtr;}
bool write(T* input, int n);
T* read(int n);
private:
T* start, *writePtr, *readPtr;
size_t maxbytes, numofeles;
};
template
bool writeandread::write(T* input, int n)
{
if (input == NULL && n > 0)
return false;
if (maxbytes-numofeles < n*sizeof(T)/sizeof(char))
return false;

numofeles += n*sizeof(T)/sizeof(char);
for (int i = 0; i < n; ++i)
{
*writePtr = *input;
++writePtr;
++input;
}
return true;
}
template
T* writeandread::read(int n)
{
if (n <= 0)
return NULL;
T* res = (T*) malloc(n);
T* t = res;
int count = 0;

while (writePtr != readPtr)
{
*t = *readPtr;
++t;
readPtr += sizeof(T);
++count;
}
if (count < n)
readPtr = start;
return res;
}


Q18. How to parse a phone number from a huge database of a n billion web pages in 30 minutes?

ANS:
The numbers do have semantic meaning, eg: location. Hence, if the database is distributed, that helps. Additionally, the DB must be stored in a N-nary search tree where N is large, reducing the height of the tree significantly.


Q19. What is the difference between an Apple Watch app and a Watch extension?

ANS:
  1. A Watch app is all about the display. It includes the resource field and storyboards, and its what the end users see.
  2. A Watch extension contains the logic of your app. It manages the content, responds to user interactions, and updates the user interface. The extension actually runs on the users iPhone.


Q20. Can the app get access to use the Watch microphone?

ANS:
No, at least not yet. The gatekeepers in Cupertino do not allow that right now, though you can access the iPhone microphone from the Watch.


  
   






FreshersLive - No.1 Job site in India. Here you can find latest 2016 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.

closepop
closepop