HITEQUEST
technical interview Q & A for high-tech professionals
 
 
Interview Questions
Electronics Hardware
Computer Software
Intel screening questions
Quick Thinking Tests
General questions
Phone screening questions
Submit your Q or A

Resources
Technical articles
Technical discussion
Engineers share info
Resume and interview
How to get a job in Silicon Valley
How much are you worth on market?
Why you may need an agent

Break point
Written Exam
Logic Tests
Professional Test
Tomato company
Cup of coffee
How stock market works
Engineering jokes

About Hitequest
About Hitequest
Home page

 
 
 
 
 
 

 
=Computer Software Questions=

   
   

Q:Write a progam to print a binary tree such that the root is printed in the middle of its left and right sub-trees.
 
 

 
 

A:RT from Rutgers
the code will be like this: a binary tree can be walked as a pre order, post order or in order tree.
 
 
typedef struct node{
int value;
node * left;
node * right;
}btnode;
 
 
void printtree(*root)
{
node * curr = root;
printtree( curr->left);
printf(" value is %d", curr->value);
printtree(curr->right);
}

 
  this is a recursive function call. we would also need to include boundary conditions when we reach the leaves.
 
 
 
 
 

Submit your answer here