Programming Code 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,

20 22982

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 15009

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

Fusion Systems GmbH,

6 10121

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


8 10835

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.


2 4829

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)


7 18707

program to Reverse a linked list

Microsoft, Aricent, Ness Technologies,

12 44430

write a program to Insert in a sorted list


4 8287

Program to Delete an element from a doubly linked list.

Infosys, College School Exams Tests,

4 23462

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

Amazon, Adobe, EFI, Imagination Technologies,

13 70488

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


3 11512

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 19750

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 7816

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

2 11772

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 161688

Un-Answered Questions { Programming Code }

Performance Algorithm A performs 10n2 basic operations and algorithm B performs 300 lg n basic operations. For what value of n does algorithm B start to show its better performance?


what are the other loops except for for,while,do while and until?


JasperETL how to install and create simple project explain me clearly fnds iam wtg for ur rply


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.


In a gymnastic competition, scoring is based on the average of all scores given by the judges excluding the maximum and minimum scores. Let the user input the number of judges, after that, input the scores from the judges. Output the average score. Note: In case, more than two judges give the same score and it happens that score is the maximum or minimum then just eliminate two scores. For example, if the number of judges is 5 and all of them give 10 points each. Then the maximum and minimum score is 10. So the computation would be 10+10+10, this time. The output should be 10 because 30/3 is 10.


write a function that allocates memory for a single data type passed as a parameter.the function uses the new operator and return a pointer to the allocated memory.the function must catch and handle any exception during allocation


Coding for Synchronizing Cache Access in ASP.NET?


Write Down Steps Using SAX Parser


how to track links visited in google using iframes


What is the code of Password Recovery or Forget your password? Plz tell in c # language.


#include int main() { int x=2,y; y=++x*x++*++x; printf("%d",y); } Output for this program is 64. can you explain how this output is come??


how to test the orientation of the layout in note any changes in the ui design when change orientation


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


Is there any static classes are in java give some examples


How to export 2 datatables of a single dataset to 2 different worksheets of a single MSExcel file ?