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 23656

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 15181

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

Fusion Systems GmbH,

6 10326




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

Microsoft,

8 11107

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 4958

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 18970

program to Reverse a linked list

Microsoft, Aricent, Ness Technologies,

12 44757

write a program to Insert in a sorted list

Microsoft,

4 8436

Program to Delete an element from a doubly linked list.

Infosys, College School Exams Tests,

4 23756

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

Amazon, Adobe, EFI, Imagination Technologies,

13 70949

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

Microsoft,

3 11678

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 20226

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 7932

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

2 11945

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 163380







Un-Answered Questions { Programming Code }

I have this code in leftmenu.ascx page..now on leftmenu.ascx.cs page i want to access id values. but i dont want to check manually like Accommodation,Arts etc.. In cs file my code is like string str[]; //this array contains some values say 10 strings for(i=0;i<100;i++) { if(str[i]==id id.visible=true } i.e.i want to travel for each element of str and each value of id.if they match then id.visible=true how to do?

2449


create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00

3000


what mean void creat_object?in public class in this code class A{ public: int x; A(){ cout << endl<< "Constructor A";} ~A(){ cout << endl<< "Destructor A, x is\t"<< x;} }; void create_object(); void main() { A a; a.x=10; { A c; c.x=20; } create_object(); } void create_object() { A b; b.x=30; }

1006


How to palindrom string in c language?

4696


How many digit have a Polaris 1995 300c.c. 2x4 nad how many have a Polaris 2007 300 c.c 2x4? And what site I can check this information???

1386


What is the functionality of FindWindow?

354


hai, i want to know how the connectionpool manager work in the java or netbeans.Anybody having the exact code plz give to me i have no idea about that so help me plz

1618


What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql

1190


#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??

189


1+1/2!+1/3!+...+1/n!

899


Design an implement of the inputs functions for event mode

1640


What is GUID anyway?

330


can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail

941


ArrayList declaration in .net

1777


1.Why does only one copy of a servlet object get created? What happens if you want to remove an old servlet object currently running but do not want to stop the entire servlet engine? 2.How does one servlet object deal with interactions from many browser? (e.g. if your servlet ran an email site, how can it keep track of hundreds of users logging in, reading their mail, etc.)

1474