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.

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

21 28492

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

Microsoft, Mentor Graphics,

2 17246

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

Fusion Systems GmbH,

6 12205




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

Microsoft,

10 13695

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 6288

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 21440

program to Reverse a linked list

Microsoft, Aricent, Ness Technologies,

12 47325

write a program to Insert in a sorted list

Microsoft,

4 9737

Program to Delete an element from a doubly linked list.

Infosys, College School Exams Tests,

4 27019

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

Amazon, Adobe, EFI, Imagination Technologies,

13 74830

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

Microsoft,

3 13081

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).

TCS, Intel, Microsoft,

12 23643

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 9439

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

2 13479

How to swap two variables, without using third variable ?

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

104 173778







Un-Answered Questions { Code Snippets }

Sir... please give some important coding questions asked by product companies..

825


How can restrict user to type upto 8 characters in textbox in php?

885


how to get the User's Time of Day

980


Give me some tips in c#?

1409


What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?

2383






Discuss an algorithm to traverse a tree, depth first.

550


How to change winform look?

1580


how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.

1175


i really need help about this.. write a program to display the set of odd and even numbers separately. find the highest and lowest value of the given numbers.

1142


Given a circular list of integers (when you reach the end of the list you come back to the beginning), what is the most efficient algorithm to find the smallest integer in the list? For example: circular_list = [22, 52, 66, 82, 5, 8, 12, 19].

666


What is Generic" J2ME architecture?

1062


What is data _null_? ,Explain with code when u need to use it in data step programming ?

1718


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

2393


find level of following tree (state, parent) " J,D I,D H,C E,B F,B G,C B,A D,A C,A A,& K,E L,E L,F M,F N,G O,H P,I P,H Q,I R,J S,K U,P T,L

1004


how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

2025