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 27065

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 16683

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

Fusion Systems GmbH,

6 11632

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


10 12985

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 5952

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 20713

program to Reverse a linked list

Microsoft, Aricent, Ness Technologies,

12 46622

write a program to Insert in a sorted list


4 9434

Program to Delete an element from a doubly linked list.

Infosys, College School Exams Tests,

4 26257

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

Amazon, Adobe, EFI, Imagination Technologies,

13 73840

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


3 12728

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 22795

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 9060

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

2 13046

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 171148

Un-Answered Questions { Programming Code }

How to Get File Extension?


an on-line examination application using html jsp servlet and jdbc. including session management and cookies


What is the functionality of EnumChildWindows?


Create a program to read two random data set in two files named data1.txt and data2.txt manifold contains integer numbers, whereas data2.txt file contains the float type numbers. Simpanlahmasing each into 2 pieces of data that is an array of type integer array and an array of type float, then calculate the average numbers in the second array.


how to diplay a external image of output on winxp by using c & c++,


Ask the user to input three positive integers M, N and q. Make the 2 dimensional array of integers with size MxN, where all the elements of I (I = 1,…,M) line will be members of geometrical progression with first element equal to the number of line (I) and denominator q.


what full form name of B.K.U.


write a simple calculator c program to perform addition, subtraction, mul and div.


How to Check if Folder Exists?


write a program using virtual function to find the transposing of a square matrix?


Implement a command console for changing settings on a particular object. The command console should allow you to enter a string and will return the response (very similar to a terminal session). The commands are as follows: SET propertyname=newvalue will change the target object’s member named “propertyname” to have a value equal to “newvalue”. If the input value is incompatible (i.e. an int being set to a string), print out an appropriate error message. GET propertyname will print out the current value of the target object’s member named “propertyname”. GET * will print out a list of all target object members and their current values. The system should be extensible for future commands and should accept an arbitrary object, such that another developer could insert another object into the system and rely on the command console to get and set the properties correctly.


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.


can any body give me answer to this question please? please give me code in cl with the folling specifications. 1.Accept 2 parameters-date and date type 2.If date type is J then convert date to *MDY format 3.If date type is M convert date to *JUL format 4. Send a program message with the value of converted date? Please give me the answer.Because im practicing in my house.Im taking trining on AS/400.


write a c program which takes 20 numbers in an array as input from user and rearrange them in two different array defining even or odd


Is there any static classes are in java give some examples