Question to ask an interviewee
-
int i = 0;
i = i++;What is the value of i after executing these statements.
Not knowing the answer (0 or 1) even though I have 11 years of experience and I have written > 500K lines of C++ code I would have to answer that this is bad code and the coder should be shot on the spot.
John
-
Hi all, What would you consider a good question to ask to a potential programmer to see whether he/she is worth their salt? Thanks in advance for any suggestions Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^
How would you solve a problem like Maria?
-
Not knowing the answer (0 or 1) even though I have 11 years of experience and I have written > 500K lines of C++ code I would have to answer that this is bad code and the coder should be shot on the spot.
John
Clue: The ++ operator is called post-increment.
-
How would you solve a problem like Maria?
-
How would you solve a problem like Maria?
digital man wrote:
How would you solve a problem like Maria?
I would need to call Julie Andrews for phone a friend.
Michael Martin Australia "I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible." - Mr.Prakash One Fine Saturday. 24/04/2004
-
Hi all, What would you consider a good question to ask to a potential programmer to see whether he/she is worth their salt? Thanks in advance for any suggestions Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^
-
Not knowing the answer (0 or 1) even though I have 11 years of experience and I have written > 500K lines of C++ code I would have to answer that this is bad code and the coder should be shot on the spot.
John
You're actually keeping track of the number of lines of code you produce??
-
Hi all, What would you consider a good question to ask to a potential programmer to see whether he/she is worth their salt? Thanks in advance for any suggestions Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^
Why should you avoid floating point variable types in financial applications?
'--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd
-
How would you solve a problem like Maria?
digital man wrote:
How would you solve a problem like Maria?
Maria isn't a problem. Maria is an "opportunity" :-)
'--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd
-
int i = 0;
i = i++;What is the value of i after executing these statements.
Isn't that technically undefined, at least in C++? You can't change the value of an lvalue on the right side of the = sign. Crikey, Score: 5.0 (2 votes). I haven't written a single line of C++ production code, and don't even remember when I last wrote any C++ code at all. Maybe my mentor at my previous company was right in asking me to switch from C# to C++. :^)
Cheers, Vikram.
The hands that help are holier than the lips that pray.
modified on Friday, May 23, 2008 11:59 AM
-
Isn't that technically undefined, at least in C++? You can't change the value of an lvalue on the right side of the = sign. Crikey, Score: 5.0 (2 votes). I haven't written a single line of C++ production code, and don't even remember when I last wrote any C++ code at all. Maybe my mentor at my previous company was right in asking me to switch from C# to C++. :^)
Cheers, Vikram.
The hands that help are holier than the lips that pray.
modified on Friday, May 23, 2008 11:59 AM
I should have qualified that it was C#
-
Why should you avoid floating point variable types in financial applications?
'--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd
Cos everyone knows that cents only have two digits, fool!
-
int i = 0;
i = i++;What is the value of i after executing these statements.
1? :-O
If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker My Photos/CP Flickr Group - ScrewTurn Wiki
-
int i = 0;
i = i++;What is the value of i after executing these statements.
-
SK Genius wrote:
For some crazy reason 0
It's not a crazy reason, it's a very logical reason. But, hey, you got it. :rose:
-
Clue: The ++ operator is called post-increment.
I know that it is the post increment and that
int i,j;
i = 0;
j = i++;So after this j=0 and i=1 But in your case with i being on the both side made me have a little doubt. To my defense I had less than 5 hours sleep and no caffeine yet. My 36 year old brain does not function until the first few cups of coffee take effect.. Either way, I agree this is a good question because it leads to a follow up question to ask why is the answer 1? [EDIT]I read the other posts... And well at least the answer is 1 in vc6.[/EDIT]
John
modified on Friday, May 23, 2008 9:43 AM
-
You're actually keeping track of the number of lines of code you produce??
Since I work on my own code and projects this is pretty easy. I use project line counter from www.wndtabs.com[^]
John
-
Hi all, What would you consider a good question to ask to a potential programmer to see whether he/she is worth their salt? Thanks in advance for any suggestions Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^
http://www.newinterviewquestions.com/list.htm[^] This may help according to a job category.
Regards, Mushq
-
Hi all, What would you consider a good question to ask to a potential programmer to see whether he/she is worth their salt? Thanks in advance for any suggestions Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^
I wouldn't ask them anything. Sit them down in front of pc with VS and sql server. Ask them to create a simple web page (if it is asp.net) or winform (if a windows job) using the pubs database that has a drop down list with authors and grid populated with books by each author. If they can make it work under the pressure of the interview then hire them. If not, don't.
I didn't get any requirements for the signature
-
Isn't that technically undefined, at least in C++? You can't change the value of an lvalue on the right side of the = sign. Crikey, Score: 5.0 (2 votes). I haven't written a single line of C++ production code, and don't even remember when I last wrote any C++ code at all. Maybe my mentor at my previous company was right in asking me to switch from C# to C++. :^)
Cheers, Vikram.
The hands that help are holier than the lips that pray.
modified on Friday, May 23, 2008 11:59 AM
Vikram A Punathambekar wrote:
Isn't that technically undefined, at least in C++?
Yep, in fact gcc and MSVC will give different results.