Tagged Questions
4
votes
8answers
640 views
Grading an algorithm: Readability vs. Compactness
Consider the following exam / interview question:
Implement the strcpy() function in C: void strcpy(char *destination, char *source);
The strcpy function copies the C string pointed by source into ...
7
votes
6answers
1k views
Is it OK to mix C and C++ in an interview?
If I am asked in an interview to write down some code, should I completely stick with C++ or is it acceptable to "mix" the two to write easy code as it comes to my mind?
I'll explain it: if I'm asked ...
6
votes
1answer
639 views
“Read” a file without using a file pointer
I was asked this question in an interview. I'm somehow supposed to "read" a file into my C program as input without using a file pointer (including "f" functions, e.g. fgets, fscanf etc.). I'm also ...
9
votes
1answer
1k views
Interview for an embedded systems C developer profile - can I get references to good quality answers to these?
I was asked to provide the following code, as interview questions:
Code for kernel scheduler (I could not, he said even if some portion of code then fine I have read but reproducing them I could not ...
1
vote
8answers
1k views
Should I choose C or C++ for an interview?
I know a bit of both C and C++. I am assuming that many people who know C++ also know C. I am wondering what language I should pick to code in during an interview.
C, because it's faster to make a ...
4
votes
1answer
583 views
Coding site with test harness for basic data structures like linked list,graph,strings etc
I just took an Amazon online test and I messed it up badly. I am out of practice and have low confidence in writing code.
Are there any coding sites with test harnesses for basic data structures and ...
2
votes
3answers
214 views
How to test a code online?
I am preparing for technical interview and would like to brush my coding skills.
I have written a C++ program and would like to test it online. I don't have access to any linux compiler on my machine. ...
133
votes
20answers
23k views
Interesting interview question
Today I was asked this question. We have 2 cases with code blocks A, B and C. These code blocks don't share any resources except an iterator (int i).
Please give 3 possible reasons why case 1 could ...
3
votes
3answers
1k views
Code snippets in interview
Recently I went to an interview for a C development position. Instead of asking me questions, they just gave me 20 code snippets to find out two logical errors on each one. I just couldn't complete ...