blangela said:
I have a former student who came to me and asked if I had any idea the
types of C++ questions that EA asks potential new hires to evaluate
their C++ knowledge/skills. I do not, but I thought perhaps someone
out there does. Any EA or former EA employees want to suggest possble
interview questions?
I considered working for them at one point. Here's a questionaire they
had me submit answers for before the interview:
Q1. Given the screen space coordinates of a triangle in counter
clockwise order, how would you determine if the triangle is front or
back facing?
Q2. Unlike most modern OS's, console video game systems have no
virtual memory. Describe some memory-saving techniques for fitting a
large video game into a fixed amount of memory.
Q3. Describe the following data structures and describe their use.
Also, give examples of where they might be used in a program, and what
performance we might expect from them.
a. Linked List
b. Queue
c. Stack
d. Array
Q4. Write an *optimized* C program to convert a base 16 number to its
base 10 equivalent, without using the standard C libraries, i.e.
don't use scanf("%x"). The program should allow the user to
input the number. State any assumptions you made when writing the
program. Use 23DA as a test number.
Q5. Write one or two paragraphs answering the following questions:
a. Describe the common uses for the break, nop, and cop instructions on
many of the current processors.
b. What are the advantages and disadvantages of using a handle-based
memory allocation system over a pointer-based allocation system?
c. How would you approach optimizing a large application such as a
video game?
d. How would you attempt to understand the design of a large code base
in a short period of time?
Q6. Here are several different ways to declare constants. What are the
pros and cons of each?
A.
#define INDEX_1 0
#define INDEX_2 1
#define INDEX_3 2
#define MAX_INDEX 3
B.
enum
{
INDEX_1 = 0,
INDEX_2,
INDEX_3,
MAX_INDEX
};
C.
typedef enum
{
INDEX_1 = 0,
INDEX_2,
INDEX_3,
MAX_INDEX
} INDEX_TYPE;
D.
static const int
INDEX_1 = 0,
INDEX_2 = 1,
INDEX_3 = 2,
MAX_INDEX = 3;
E.
int
INDEX_1 = 0,
INDEX_2 = 1,
INDEX_3 = 2,
MAX_INDEX = 3;
Q7. Write an *optimized* program in C to multiply two linear matrices.
This program should take as input the dimensions of each matrix, as
well as the components of each matrix. State any assumptions you made
when writing this program. Use the following matrices as a test:
1 0
-2 3 0 6 1
5 4 3 8 -2
0 1
Q8. Why would someone program in assembly language - what are the
pluses and minuses? Are there better ways to deal with these
situations than resorting to assembly?
Because of their infamous employee policies (which are getting better
by some reports), I decided not to interview with them, but a friend
who works there was asked something like this in the interview: Write a
function to multiply a number by 7 without using the * operator.
See also my comments in this thread:
http://groups.google.com/group/comp.lang.c++/browse_frm/thread/1643f212b0557896/22b9dca8659282dc
Cheers! --M