Given a Binary Search Tree, write a program to print the kth smallest element without using any static/global variable. You can’t pass the value k to any function also.
What are the 4 basics of OOP?
Define Data Abstraction. What is its importance?
Given an array of size n. It contains numbers in the range 1 to n. [...]
Also posted in Database, General |
By admin | December 8, 2007
What is the most efficient way to reverse a linklist?
How to sort & search a single linklist?
Which is more convenient - single or double-linked linklist? Discuss the trade-offs? What about XOR-linked linklist?
How does indexing work?
char s[10];
s=”Hello”;
printf(s);
What will be the output? Is there any error with this code?
What is the difference between
char s[]=”Hello”;
char *s=”Hello”;
Please give a [...]
By admin | October 2, 2007
What is a void return type?
How is it possible for two String objects with identical values not to be equal under the == operator?
What is the difference between a while statement and a do statement?
Can a for statement loop indefinitely?
How do you link a C++ program to C functions?
How can you tell what shell you [...]
By admin | December 31, 2006
Implementing itoa function is a popular interview question. Here’s one implementation from SAP.
char *itoa(int value)
{
int count, /* number of characters in string */
i, [...]
Are you familiar with the term MESI?
Are you familiar with the term snooping?
Describe a finite state machine that will detect three consecutive coin tosses (of one coin) that results in heads.
In what cases do you need to double clock a signal before presenting it to a synchronous state machine?
You have a driver that drives a [...]
Also posted in Hardware |
How do you write a program which produces its own source code as its output?
How can I find the day of the week given the date?
Why doesn’t C have nested functions?
What is the most efficient way to count the number of bits which are set in a value?
How can I convert integers to binary or [...]
Will the following program execute?void main()
{
void *vptr = (void *) malloc(sizeof(void));
vptr++;
}
How about this one?
void main()
{
char *cptr = 0?2000;
long *lptr = 0?2000;
cptr++;
lptr++;
printf(†%x %xâ€Â, cptr, lptr);
}Will it execute or not?
When the processor wakes up after power on, it goes to a particular memory location. What is that memory location called?
What is the difference between Mutex and [...]
What are the total number of lines written in C/C++? What is the most complicated/valuable program written in C/C++?
What compiler was used?
Have you studied buses? What types?
Have you studied pipelining? List the 5 stages of a 5 stage pipeline. Assuming 1 clock per stage, what is the latency of an instruction in a 5 stage [...]
Also posted in Hardware |
By admin | March 23, 2006
This set of C++ interview questions was sent to TechInterviews from Australia:
What is the difference between an ARRAY and a LIST?
What is faster : access the element in an ARRAY or in a LIST?
Define a constructor - what it is and how it might be called (2 methods).
Describe PRIVATE, PROTECTED and PUBLIC – the differences [...]
By admin | February 6, 2006
This is not really a set of interview questions, a reader sent TechInterviews.com what looks like a copy of his notes from C++ class that describes various tricks and code for C++.
What is the output of printf(“%dâ€Â)?
%d helps to read integer data type of a given variable
when we write (“%dâ€Â, X) compiler will print [...]
By admin | January 31, 2006
How did you first get interested in Computer Science?
What do you like to do best related to computers now (programming, administration, testing, manage projects, etc)? What is it about that area that you specifically enjoy?
What is your strongest programming language (Java, ASP, C, C++, VB, HTML,C#, etc.)?
When is the last time you [...]
By admin | January 30, 2006
Write function in C that gets array of chars, and search for the longest sequence of repeatedly 1 bits. It returns the the first bit place in the sequence and the number of 1 bits in the sequence. - (a) loop of 2^0, 2^1, … , 2^7 is done with 1<<j when 0<=j<=7. (b) Take [...]
Also posted in Hardware |