Amdocs Interview Question






Comment hidden because of low score. Click to expand.
1
of 3 vote

This is really a stupid question

- Anonymous September 29, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

i++ , ++i are equal when they are the single statement of code in a line
i mean
i++;or
++i;

But they will create a difference when used in an expression like below

++i is better in following condition

sum = ++i + (i++) + (i++);
sum = ++i + (++i) + (++i);

when you have such type of expression it(post increment) makes things complex as such things will depend on compiler.

if you want straight forward logic i = i+1, ++i would be more useful.
because if you see two expression written above, i++ would makes result different because post increment will not make i = i+1 in the same line but next

- Gaurav Khurana March 16, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

++i is better. It doesn't need a copy c-or.

- AL July 08, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

right also return value optimization cant be done with i++ that is the reason y copy c-or is required.

- Anonymous July 09, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Btw, what is copy c-or ? Never heard of it :-O
Thanks.

- anon July 09, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

copy constructor i guess

- Rohit April 23, 2012 | Flag
Comment hidden because of low score. Click to expand.
-1
of 1 vote

int j = 1;
int i = j++;
System.out.println(i);

output: 1

post-increment returns the current value and then increments it.

- Anonymous July 08, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

Are you mad?
Both are important and have their own values in programming.

- sahil July 12, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

so exactly what is the best one

- himanshugupta2010ss August 29, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

i think we cannot say that one is better than other, it depend on requirement in programming

- Anonymous February 13, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

tumhe to phassi hogi phassi...

- lala November 07, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

hassi to phassi? LOL.

- Anonymous November 07, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

JUICE ME

- Anonymous November 09, 2013 | Flag
Comment hidden because of low score. Click to expand.
-1
of 1 vote

SMAJHA...

- Anonymous November 09, 2013 | Flag Reply


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