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.

Microsoft,

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.

Wipro,

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)

Microsoft,

7 20713

program to Reverse a linked list

Microsoft, Aricent, Ness Technologies,

12 46622

write a program to Insert in a sorted list

Microsoft,

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

Microsoft,

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?

374


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

3231


What is the functionality of EnumChildWindows?

320


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.

1149


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

1918


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.

2453


what full form name of B.K.U.

1755


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

2145


How to Check if Folder Exists?

385


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

1860


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.

2452


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.

1069


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.

1135


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

1704


Is there any static classes are in java give some examples

794