Apple Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
0
of 0 vote

i wonder if it is possible without any external storage. May be get the date

- guest April 17, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Hi,

I don't know the Mac FS that well, but here goes:

What if the program basically just counts 30 days from the date that the file was first created? Of course it is not tamper proof, and can be easily circumvented, but as a (very) basic scheme that can work.

- Anonymous Coward April 18, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

The first time the application executes it tries to check the date of from predefined location(some file or registry) for some object with encrypted name. If that object is not available then create new one(happens the first time). If the current date - start date > 30 must be the logic

- Anonymous April 18, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

what part of -
(which uses no external storage)
- u didn't understand ?

- Anonymous June 12, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

I don't think there is a way to store state without using any memory. So, so if you application is part of a part of a package. You package can contain a file that stores a default size of a date, then during the execution of the program, write to that file, size the format of a date string is the same, you have effectively not used any extra space.

- Anonymous October 27, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

What about giving the first date as hard coded and compare it with the current date

- Anonymous March 26, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

How about the following pseudo code:

while (count-- > 30){
println ("Register Now!");
sleep seconds_in_a_day;
}
println ("Expired!");

- Song June 29, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

And what if i restart the machine or even the program as it will shut the jvm...

Super stupid answer

- WTF August 22, 2010 | Flag


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More