Code Snippets Interview Questions
Questions Answers Views Company eMail

how to connect bind a control to database by writing a stored procedure?

Satyam,

3 5199

how to retrive file ,using file info on click event of a buton and disply it on a web form

Activa Softec,

1 5115

String copy logic in one line.

Microsoft, NetApp,

11 25215

String reverse with time complexity of n/2 with out using temporary variable.

NetApp, Symantec,

10 21315

Link list in reverse order.

NetApp,

8 15342

Sorting entire link list using selection sort and insertion sort and calculating their time complexity

Infosys, Microsoft, NetApp,

1 6679

Finding a number which was log of base 2

NetApp,

1 7884

Finding a number multiplication of 8 with out using arithmetic operator

Eyeball, NetApp,

8 16550

Given 1 to n distinct random number of which n+1th element was duplicated. How do find the duplicate element and explain the time complexity of the algorithm.

Microsoft, NetApp,

3008

Given 1 to n random number, find top 10 maximum numbers and explain the time complexity of the algorithm.

IMO, NetApp,

1 6519

Deriving time complexity of Binary tree and AVL tree, step by step.

NetApp,

4 14644

How reader and writer problem was implemented and come up with effective solution for reader and writer problem in case we have n readers and 1 writer.

Microsoft, NetApp,

6 18030

What is the time complexity T(n) of the following program? a) int n, d, i, j; cin >> n; for (d=1; d<=n; d++) for (i=1; i<=d; i++) for (j=1; j<=n; j += n/10) cout << d << " " << i << " " << j << endl; b) void main() { int n, s, t; cin >> n; for (s = 1; s <= n/4; s++) {t = s; while (t >= 1) { cout << s << " " << t << endl; t--; } } } c) void main() { int n, r, s, t; cin >> n; for (r = 2; r <= n; r = r * 2) for (s = 1; s <= n/4; s++) { t = s; while (t >= 1) { cout << s << " " << t << endl; t--; } } }

CTS, IBM, Infosys, Qatar University,

3 8950

Coin Problem You are given 9 gold coins that look identical. One is counterfeit and weighs a bit greater than the others, but the difference is very small that only a balance scale can tell it from the real one. You have a balance scale that costs 25 USD per weighing. Give an algorithm that finds the counterfeit coin with as little weighting as possible. Of primary importance is that your algorithm is correct; of secondary importance is that your algorithm truly uses the minimum number of weightings possible. HINT: THE BEST ALGORITHM USES ONLY 2 WEIGHINGS!!!

Motorola, Qatar University,

1 14776

Show by induction that 2n > n2, for all n > 4.

Karvy, Qatar University,

2 6407


Un-Answered Questions { Code Snippets }

How can i know that how many user are visited to my page in php?

1605


What is the functionality of SendMessage?

726


write a program in java to find the moving average of all prime numbers between 2 and 100.

3574


I need your help, i need a Turbo C code for this problem.. hope u'll help me guys.? Your program will have a 3x3 array. The user will input the sum of each row and each column. Then the user will input 3 values and store them anywhere, or any location or index, temporarily in the array. Your program will supply the remaining six (6) values and determine the exact location of each value in the array. Example: Input: Sum of row 1: 6 Sum of row 2: 15 Sum of row 3: 24 Sum of column 1: 12 Sum of column 2: 15 Sum of column 3: 18 Value 1: 3 Value 2: 5 Value 3: 6 Output: Sum of Row 1 2 3 6 4 5 6 15 7 8 9 24 Sum of Column 12 15 18 Note: Your program will not necessary sort the walues in the array Thanks..

2791


We need to write the function to check the password entered is correct or not based on the following conditions.. a) It must have atleast one lower case character and one digit. b)It must not have any Upper case characters and any special characters c) length should be b/w 5-12. d) It should not have any same immediate patterns like abcanan1 : not acceptable coz of an an pattern abc11se: not acceptable, coz of pattern 11 123sd123 : acceptable, as not immediate pattern adfasdsdf : not acceptable, as no digits Aasdfasd12: not acceptable, as have uppercase character

3940






create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file

2204


find out the list of users who have access to all t-codes starts with 'SU'? thanks in advance all.

2013


Write a routine to implement the polymarker function

4364


code to images to rollover

1848


develop a program to calculate and print body mass index for 200 employees

2198


write a program to input a natural number less than and display it in words.test your program on the sample data and some random data sample input= 29 sample output= Twenty nine sample input=17001 sample output= out of range sample input=119 sample output =one hundred and nineteen sample input=500 sample output=five hundred

3443


Write a function to efficiently convert a floating point number to a rational number. For example, given 0.125 return "1/8"

1166


Code for Method of Handling Factorials of Any Size?

1989


What is a well formed XML document?

324


What output does the following code generate? Why? What output does it generate if you make A::Foo() a pure virtual function? class A { A() { this->Foo(); } virtual void Foo() { cout << "A::Foo()" << endl; } }; class B : public A { B() { this->Foo(); } virtual void Foo() { cout << "A::Foo()" << endl; } }; int main(int, char**) { A objectA; B objectB; return 0; }

629