Accenture Interview Question


Country: United States




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

It should be a 0 (indicative of a boolean false). !k should be 0 and 0 < 0 will be false.

- Kumar March 03, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

K is an integer and (0< !K) returns boolean. !K is equal to zero for all non zero values and is one when K is zero. Therefore, !-7 is 0 and (0<0) is false. False in C is 0 and true is a non zero value. As a result, the output has to be zero since 0<0 is false.

- mahdi.oraei March 03, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

applying ! to any nonzero gives 0 .so in printf 0<0 ,it is false statement .so output is 0.

- nani.m March 04, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

It will be 0 because
> 0<!-7
> 0<0
and 0 is not less then of 0 so its return false and false value is equal to 0 in int datatype

- Mohit April 17, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

0 is right answer

- suman June 07, 2015 | 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