Qualcomm Interview Question for Software Engineer / Developers






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

int ***p;
int i,j,k;
for(i to BLOCKS)
p = malloc(BLOCKS)
for(j to COLUMNS)
p[i] = malloc(COLUMNS)
for(k to ROWS)
p[i][j] = malloc(ROWS)

- mlakshmanarao August 03, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

int a[10][10][10];

- scarlet August 20, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

How do you do it dynamically?

I have another doubt.
wats the difference between char a[2][2] and char *[2][2] ?

2nd declaration is an array of char pointers? which can have stings of size upto 2?

- Ab February 21, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

int ***arr= (int ***) malloc(sizeof(int **)*xside);

for(i=0;i<yside;i++)
{
arr[i] = (int **) malloc(sizeof(int *)*yside);
for(j=0;j<zside;z++)
arr[i][j] = (int *) malloc(sizeof(int)*zside);
}

- ajay November 22, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Use normal 1-D array with w*h*b as the size. You can manipulate it for getting the values.

- Erick April 15, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

I.e. int* arr = (int*) malloc( w*h*b*sizeof(int))

for arr [i][j][k], the value is arr[ (k*h + j)*w + i ] (where i increments till w, j increments till h and k increments till b

- Erick April 15, 2013 | Flag


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