Walt Disney Company

  www.disney.com
Work in HR? Unlock Free Profile

Walt Disney Company Software Engineer Interview Question

I interviewed in Seattle, WA and was asked:
"Write code to reverse the digits in an integer."
Add Tags [?]
Answer

Part of a Software Engineer Interview Review - one of 201 Walt Disney Company Interview Reviews

Answers & Comments

0
of 2
votes

int reverse(int a) {
        int b = 0;
        while (a>0) {
            b *= 10;
            b += a%10;
            a /= 10;
        }
        return b;
    }

- no one on Mar 1, 2013

To comment on this question, Sign In with Facebook or Sign Up

Tags are like keywords that help categorize interview questions that have something in common.