Top C++ Code Interview Questions :: ALLInterview.com http://www.allinterview.com Top C++ Code Interview Questions en-us Min-Max Write an algorithm that finds both the smallest and larg http://www.allinterview.com/showanswers/28642.html 2(n-1) Deriving time complexity of Binary tree and AVL tree, step by step. http://www.allinterview.com/showanswers/28345.html I do not know what the answer is .I am subhani and you are not my friend .However I do not the answer.But you do not know the answer.You have already told me that i have already strike with the girls available in the room. How reader and writer problem was implemented and come up with effect http://www.allinterview.com/showanswers/28346.html The reader and writer problem is IMPLEMENTED THROUGH SEMAPHORES. THE EFFECTIVE SOLUTION TO SOLVE THE READER AND WRITER SOLUTION IS : A) If a writer is waiting in the ready queue to enter into the critical section, then the current re Where now stands that small knot of villages known as the Endians, a http://www.allinterview.com/showanswers/36623.html ANSWER Write A C++ Program To Input A Number Between 20 To 99 And Display I http://www.allinterview.com/showanswers/18210.html #include<iostream.h> #include<conio.h> void main() { char a[9][10]= {"one","two","three","four","five","six","seven","eight","ni ne"}; char b Wrie a function which returns the most frequent number in a list of http://www.allinterview.com/showanswers/36621.html I somehow feel that the code can be made more efficient. I will leave this job to someone else #include<iostream> #include<conio.h> //for getch using namespace std; //for cout int main() { int arr[100]; Coin Problem You are given 9 gold coins that look identical. One i http://www.allinterview.com/showanswers/28635.html 1. Divide the coins in 3 groups of 3 coins each 2. Put 2 groups in the weighing scale 3a. If both the groups weigh equal 1. Pick 2 coins from the 3rd group and put in weighing scale 2. If they weigh equal, the 3rd coin is counterfeit. El using repetition structure. Write a c program that will accept five n http://www.allinterview.com/showanswers/77018.html #include <iostream> using namespace std; int main () { int a[6],i,ec=0,oc=0; for(i=0;i<5;i++) cin>>a[i]; for (i=0;i<5;i++) { if (a[i]%2==0) ec++; else oc++; } cout<<"\t Eve What is the time complexity T(n) of the following program? a) int http://www.allinterview.com/showanswers/28634.html 1.t(n)=10*n*n*(n+1)/2 2.t(n)={n/4*(n/4)*[(n/4)+1]}/2 write a c program, using for loop, that accepts and odds two numbers. http://www.allinterview.com/showanswers/77019.html #include<stdio.h> void main() {int a,b,m=1; printf("enter the two no\n"); scanf("%d %d",&a,&b); while(m<=5) { printf("sum of %d and %d is %d \n",a,b,(a-- + b++)); m++; } } program to find the magic square using array http://www.allinterview.com/showanswers/75397.html Counting in Lojban, an artificial language developed over the last f http://www.allinterview.com/showanswers/36622.html #include<iostream.h> #include<conio.h> void main() { int i=0,k; char ph,ch[10]; clrscr(); while(ph!='\r') { ph=getche(); ch[i]=ph; i++; } cout<<endl<<endl<<endl; for(k=0;k<i;) { if(ch[k]==& what is the difference between int &amp;r and int&amp; r http://www.allinterview.com/showanswers/70068.html according to me int &r is declaration , and int& r is reference . How do I store linked list datas into an array? http://www.allinterview.com/showanswers/60665.html If you have the predetermined length of the number of nodes in the linked list then you could have went for arrays initialy only . But still if you want to store the complete linked list into an array i think dynamic arrays are best option. how to find out the maximum number out of the three inputs. http://www.allinterview.com/showanswers/86035.html 27