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.

Google, Goldman Sachs, eBay, ABC, Microsoft, HUP, TATA,

21 33782

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 18823

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

Fusion Systems GmbH,

6 14098




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

Microsoft,

10 16317

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 7399

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 23892

program to Reverse a linked list

Microsoft, Aricent, Ness Technologies,

12 49773

write a program to Insert in a sorted list

Microsoft,

4 10913

Program to Delete an element from a doubly linked list.

Infosys, College School Exams Tests,

4 29003

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

Amazon, Adobe, EFI, Imagination Technologies,

13 77576

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

Microsoft,

3 14168

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 26559

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 10646

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

2 14985

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 184660







Un-Answered Questions { Code Snippets }

Why XSLT is important for XML?

19


plz send code for Ecorps in j2ee frontend:J2EE Backend: DB2 Express

1851


What are XML Namespaces?

19


how to Auto Scroll the page

1132


i want run following code on button click of view. i am trying to retrieve data from isc_order_details table and isc_product table. but after retriaval of data i m getting error like FIELD MUST BE ENTERED!! DECLARE m number; n number; CURSOR order_details IS SELECT PRODUCT_ORDER_QUAN,PRODUCT_ID FROM isc_order_details WHERE order_id=:isc_order_master.order_id; amount NUMBER (8,2):=0.0; alert number; BEGIN go_block('isc_order_details'); first_record; m:=:system.cursor_record; last_record; n:=:system.cursor_record; OPEN order_details; --for i in m..n loop FETCH order_details INTO :ISC_ORDER_DETAILS.PRODUCT_ORDER_QUAN,:ISC_ORDER_DETAIL S.PRODUCT_ID; IF order_details%FOUND THEN SELECT order_value,order_date INTO :ISC_ORDER_MASTER.ORDER_VALUE,:ISC_ORDER_MASTER.ORDER_D ATE FROM isc_order_master WHERE order_id=:ISC_ORDER_MASTER.ORDER_ID; SELECT product_desc,product_price INTO :ISC_ORDER_DETAILS.PRODUCT_DESC,:ISC_ORDER_DETAILS.PROD UCT_PRICE FROM isc_product WHERE product_id=:ISC_ORDER_DETAILS.PRODUCT_ID; next_record; END IF; EXIT WHEN order_details%NOTFOUND; END LOOP; last_record; CLOSE order_details; EXCEPTION when NO_DATA_FOUND then alert:=SHOW_ALERT('ENTER_DATA'); Go_Item('isc_order_master.order_id'); END;

1416






Which tag is used to find the version of XML and the syntax?

19


how exactly is the lngColour used?

1280


How to get Filename from Path?

439


Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines

2282


Code for Adding Scripting Support to an Application?

1285


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

2934


code to sorting an array of objects

1474


Write a python program to count the number of digits in a number?

27


Who is responsible for XML?

33


how to take time as input in the format (12:02:13) from user so that controls remains between these columns?

1259