Software Engineer / Developer Interview Report
- 1of 1 vote
Answers50 char *b, q, *r;
- Thomas January 03, 2010
200 b = getbuf ();
201 q = *b;
212 R = anotherfunction (b);
213-2003 /* we want to use 'q' and 'r' here */
2000 char * getbuf ()
2001 {
2002 char buff [8];
2003-2050 /* unspecified buff defined here */
2051 return (char*) buff;
2052 }
1. What will be in variable 'q' after line 201 is executed? Under
what conditions might this not be so?
2. Is there an alternative, but equivalent, way to write line
2000? If so, what is it?
3. Is getbuf() a reasonable function?
4. Will getbuf() execute at all?
5. Please comment on line 2051.
6. Is getbuf() good practice, and why?
7. What line not given should be provided for compilation?
8. How, exactly, could one get a second 'char*' to use back from
this function? Be specific in terms of the exact syntax needed. (That
is, provide code.) Another way to state this question is how can this
function be modified to return a 'char*' (that is, it maintains the
same return type) from the function, and an additional 'char *' value
in one function call. Please make sure that your answer will work even
if the size of the char * desired is not known in the outside calling
function. Avoid (do no use) C++ syntax. Include statement in called and
calling functions. Use food programming practice.| Report Duplicate | Flag | PURGE
Software Engineer / Developer C - 0of 0 votes
AnswersFor those candidates who know SQL: There is a table with
- Thomas January 03, 2010
gene_ids ('gid') and clone_ids ('cid'). Each gene only resides on a
single clone and each clone may contain multiple genes. How do would
you find how many genes are on each and every clone? Please provide the
SQL.| Report Duplicate | Flag | PURGE
Software Engineer / Developer Database - 0of 0 votes
AnswersWhat's the difference between system calls and library functions?
- Thomas January 03, 2010| Report Duplicate | Flag | PURGE
Software Engineer / Developer C++ - 0of 0 votes
AnswersDefine a class to represent a graph which supports following opertations
- shaktiman June 25, 2013 in -
addEdge(Node n1,Node n2)
addNode(Object nodeData)
How do you differentiate between an edge n1->n2 and n2->n1| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer