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 48700

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 22068

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

Fusion Systems GmbH,

6 20464

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

Microsoft,

10 25474

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 10663

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 29669

program to Reverse a linked list

Aricent, Microsoft, Ness Technologies,

12 58919

write a program to Insert in a sorted list

Microsoft,

4 14216

Program to Delete an element from a doubly linked list.

College School Exams Tests, Infosys,

4 32975

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

Adobe, Amazon, EFI, Imagination Technologies,

13 88022

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

Microsoft,

3 17154

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 37204

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 13963

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

2 20522

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 233642


Un-Answered Questions { Code Snippets }

What is the functionality of SetForegroundWindow?

576


Design a timer circuit using VHDL which has the following: input : start_timer(ST) output: long_time(LT) short_time(ST) when the timer is triggered by the ST(either 0 or 1) signal the timer should generate two timing signals accordingly.While the long time is going ON the other should be OFF and vice versa.

2222


Write a function that takes an array of integers and efficiently calculates and returns the Least Common Multiply in python.

1346


1.Explain what happens to a session object when the browser associated with it is closed? 2.Explain how a session object is created and used. (Note: you are not required to provide the Java statements such as ‘getAttribute’)

2184


code to images to rollover

2007






Can we change the validator-rules.xml for our own validations in struts??

2479


find out the list of users who have access to all t-codes starts with 'SU'? thanks in advance all.

2131


program for straight line(y=mx+c)

5711


What are the basic rules while writing XML?

401


How to change winform look?

2477


How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?

2244


How to swap two ASCII numbers?

2645


Bubble Sort. java thereafter the user will be asked to inpout the size of the list,sort the list in ascending order and display the sorted list in a horizontal manner???

2686


How to check if Folder is a Special Shell Folder ?

504


Hi All, Do anyone have a solution/script for Uploading the Excel file in Local drive to QC Resources folder..?? TIA Dwaraka.

1311