Code Snippets Interview Questions
Questions Answers Views Company eMail

Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like.

ABC, eBay, Goldman Sachs, Google, HUP, Microsoft, TATA,

21 45830

Write a routine to draw a circle (x ** 2 + y ** 2 = r ** 2) without making use of any floating point computations at all.

Mentor Graphics, Microsoft,

2 21385

Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.

Fusion Systems GmbH,

6 19209

Give a one-line C expression to test whether a number is a power of 2.

Microsoft,

10 23807

Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.

Wipro,

2 9969

Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)

Microsoft,

7 28232

program to Reverse a linked list

Aricent, Microsoft, Ness Technologies,

12 57014

write a program to Insert in a sorted list

Microsoft,

4 13472

Program to Delete an element from a doubly linked list.

College School Exams Tests, Infosys,

4 32151

Write a function to find the depth of a binary tree.

Adobe, Amazon, EFI, Imagination Technologies,

13 86064

Write a routine that prints out a 2-D array in spiral order

Microsoft,

3 16520

Write, efficient code for extracting unique elements from a sorted list of array. e.g. (1, 1, 3, 3, 3, 5, 5, 5, 9, 9, 9, 9) -> (1, 3, 5, 9).

Intel, Microsoft, TCS,

13 35175

Given a list of numbers ( fixed list) Now given any other list, how can you efficiently find out if there is any element in the second list that is an element of the first list (fixed list)

Disney, Google, ZS Associates,

3 13266

Print an integer using only putchar. Try doing it without using extra storage.

2 19645

How to swap two variables, without using third variable ?

AB, ADP, BirlaSoft, Cisco, Cygnet Infotech, HCL, Hewitt, Honeywell, HP, IBM, Infosys, Manhattan, Microsoft, Mobius, Percept, Satyam, SofTMware, TCS, Wipro, Yamaha,

104 223079


Un-Answered Questions { Code Snippets }

What is SGML?

331


What is XQuery?

359


3. Program to find the Sum of give series. a. (1)+(1+2)+(1+2+3)+(1+2+3+4)+……………………………….. b. 1/1+1/9+1/25+1/49+……………...

4343


What is the functionality of GetWindowText?

542


how to test pierrot divisor

2247






What is full form of PEPSI

1855


How can export database using php code?

1575


Write a python program to print table of a given number?

456


Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines

3019


can we pass variable in array to traverse it?

1940


Which keyword is alias for count keyword in php?

1673


How we work on N tire architecture in asp.net Please give me Examle...

16569


Coding for .NET Delegates?

2085


Is it possible to write JAVA program without including any of the packages,such as "import java.io.*"; bcoz I instantly wrote a code without "import..." statement and runned the program on command Line & it worked. the code is: class Person { String name; int age; Person(String s,int a) { name = s; age = a; } accept() { System.out.println(name+"Hi!!!!!"); System.out.println(age); } } class Demo { public static void main(Strings args[])throws IOException { String name = args[0]; int age = Integer.parseInt(args[1]); Person p = new Person(name,age); p.accept(); } }

1763


program to show a progress bar

2117