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 45528

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 21340

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

Fusion Systems GmbH,

6 19083

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

Microsoft,

10 23634

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 9916

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 28090

program to Reverse a linked list

Aricent, Microsoft, Ness Technologies,

12 56783

write a program to Insert in a sorted list

Microsoft,

4 13398

Program to Delete an element from a doubly linked list.

College School Exams Tests, Infosys,

4 32070

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

Adobe, Amazon, EFI, Imagination Technologies,

13 85850

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

Microsoft,

3 16452

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 34985

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 13198

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

2 19572

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 222245


Un-Answered Questions { Code Snippets }

why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

2222


how to create an anonymous function

1713


write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used

4280


Write a python program to check common letters in two input strings?

464


Teta-Omeg-Big-Oh Show that f(n) = n2 + 3n3 is ;(n3).

3171






plz tell me the exam date for clerks in sbi

1767


ArrayList declaration in .net

2725


Write a Program to find the sum of digits of a given number until the sum becomes a single digit.

500


sample code to auto focusing the first field in a form

2015


Code for Document Validation in XML.NET?

1959


Write a function that takes an unsorted integer array, and returns a three element subset whose sum is zero.

1219


How to Bind Nested XML to a Repeater Control with Container.DataItem?

3190


how exactly is the lngColour used?

1768


Write a python program to check if a string is a palindrome or not?

478


What is XML DOM Document?

333