iOS Programming logics test

Ritmo

macrumors member
Original poster
Mar 27, 2009
49
16
Finland
Hi guys, trying to prepare for a job interview that will have some programming test by doing some tests online.

I found this(http://www.it-smc.com/Articles/ProgrammingSeftTest.pdf) test but can´t find the answers anywhere.

Does anyone have answers for it? I would love to check my doubts on couple questions.

Or if someone could say their opinion about questions 4, 15 and 18 that would be nice.
Thanks.
 

Natzoo

macrumors 65816
Sep 16, 2014
1,266
138
Hi guys, trying to prepare for a job interview that will have some programming test by doing some tests online.

I found this(http://www.it-smc.com/Articles/ProgrammingSeftTest.pdf) test but can´t find the answers anywhere.

Does anyone have answers for it? I would love to check my doubts on couple questions.

Or if someone could say their opinion about questions 4, 15 and 18 that would be nice.
Thanks.
I don't know this and i don't mean to be a waste of your time, but what job interview requires this advanced work. I think i know a website that can help but idk if its cheating
 

Ritmo

macrumors member
Original poster
Mar 27, 2009
49
16
Finland
I don't know this and i don't mean to be a waste of your time, but what job interview requires this advanced work. I think i know a website that can help but idk if its cheating
I don´t think this is advanced. It just shows how you think when it comes to logic. You don´t even have to know the language. I even remember having one math class in school about logic.

I´m not cheating as I already did the whole test. Now I just want to see how I did.
 

Natzoo

macrumors 65816
Sep 16, 2014
1,266
138
Well, is there logistics tutors? Maybe they can check your answers.
 

1458279

Suspended
May 1, 2010
1,601
1,521
California
Well, is there logistics tutors? Maybe they can check your answers.
I can't tell if you're joking or not.

Logistics: the planning, implementation, and coordination of the details of a business or other operation.

Logic is philosophy:
One area of mathematics that has its roots deep in philosophy is the study of logic. Logic is the study of formal reasoning based upon statements or propositions.

Many programmers only understand syntax, execution control, and APIs.

To be an advanced developer, you need logic and creative problem solving.

OP: I'll check your answers and post back (my advance study in college was philosophy).
 

1458279

Suspended
May 1, 2010
1,601
1,521
California
I went thru some of it and noticed this is really poorly written. It has unusual usage of commonly used operators and some of the answers seem to be very dependent on the compiler behavior.

So, I went to the page and noticed it has < 2000 visitors since 2002! and the lic publication was in 2007. The page looks like it was written even before 2002 :rolleyes:

I went thru some and then lost interest because I really don't see how this test would help unless you are applying for a job that uses whatever system (language) they are using.

I quit when I notice they were talking about logging in. Sounds like an old online realtime system rather than a compiled type language.

Is there a reason you picked that test? Doesn't seem to be related to any modern system, and the website seems beyond dead.

Answers (if it helps)

A
B
G
E? -- They set 'A = 0' so the 'array' is not an array, it's a variable. then they define the elements of an array. This should override the 'A=0' and define an array named 'A' … the question is using math on an array with elements but not selecting any one of the elements. The results may be defined by the language / compiler.

F?
1+1 = 2
2*3 = 6
6/2 = 3
3+7=10
10#12 = 2 Note: it said STRICTLY LEFT TO RIGHT

#6
B and C
I'll say C because if you have a - number, it won't be > 0,
and B because if A is 1, it's false

# 7
A

#8
A
B

#9 is confusing "if you were asked for '17" … it doesn't say to apply ' to integer 17 which it says would be nill (not zero). So the answer (if the question is apply ' to 17) would be nill which is not on the list. So what does 'asked for' mean? to get the value of the expression? … so what's stored when you get a nill? (which they don't tell us, however they do mention above in the True/False that False is nill)

So it could be either 0 or " " unless the " " is a "" but it looks like a " " (space character vs no character)

Note: this seems very language specific, not so much logic. If you knew the language, you could run the program, without a language behavior, I see it as confusing.

Also note: I saw in # 11: In arithmetic expressions, the "nill" string is evaluated as a zero. So maybe this is 0. Seems to depend on what they mean by 'asked for' which seems to mean 'retrieve the value of'

#10
A

#11
B

#12
F

#13
C

#14
A

#15
Dam hard to tell with the limited information given
0.A+B+C-3
looks like:
"0JOHN" + "JANE" + "3DOES" -3
would be 0 - 3 or -3 because the last operation is math and it takes all the numbers until it reaches the 1st non number (H none of the above)
 

1458279

Suspended
May 1, 2010
1,601
1,521
California
18 doesn't tell you what K K,S would do. It tells you nothing about listing variables with a comma in a "kill" command.
 

Ritmo

macrumors member
Original poster
Mar 27, 2009
49
16
Finland
Is there a reason you picked that test? Doesn't seem to be related to any modern system, and the website seems beyond dead.
No big reason just something I could find. I think the language is on purpose weird and invented.

On the answers that I disagree:

#4 this on is weird like I said in the beginning
It talks about arrays but it looks like simple calculation. So with strictly from left in mind is
0+0+0+1?

#5
10%12 is modulo so answer is 10. (12%10=2)

#6
B as it says A is not 0

#8
Should be E. Argument is true if any of the variable is true.

#9 is explained later. But nil numeric becomes empty.
B

#11
E Whatever is going on here it does not = 0

#13
B? It talks about concatenation but is this just simple calculation?

#15 Yeah one of the weird ones
A or H? Could argue for both.

#18
A,B or G?
I think we kill K, J and S variables.
So is it no variables set or do T and Z get their values before S is killed.
If so from previous: "Thus, 1+2=3 evaluates to "rubout" and 1+3<2 evaluates to "" (nill)."
T=6 and Z=6>6 is ""
 
Last edited:

JohnsonK

macrumors regular
Mar 6, 2014
142
0
no big reason just something i could find. I think the language is on purpose weird and invented.

On the answers that i disagree:

#4 this on is weird like i said in the beginning
it talks about arrays but it looks like simple calculation. So with strictly from left in mind is
0+0+0+1?
a(a(a+1))

a(a(0+1))

a(a(1))

a(32767) = "THIS IS A STRING"
 

thekev

macrumors 604
Aug 5, 2010
6,799
2,109
No big reason just something I could find. I think the language is on purpose weird and invented.

On the answers that I disagree:

#4 this on is weird like I said in the beginning
It talks about arrays but it looks like simple calculation. So with strictly from left in mind is
0+0+0+1?
You should re-read that one. The strictly left to right condition is imposed on the next problem on arithmetic operators. It also makes little sense to think that way on something surrounded by parentheses, as they are explicitly used to indicate that whatever is within parentheses should be evaluated first. This also seems like an overly trivial exam. I don't think you'll get much out of it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.