Code Snippets Interview Questions
Questions Answers Views Company eMail

Write a code snippets to find greatest and least of any number of inputs without taking the help of array

Infosys, Wipro,

1 4773

How to write a reusable function for testing an "Button" Objects in a page without passing the page name to a function? (Think if page names are dynamic and doesn't have any pattern matching between each page). Send me code which works in QTP 9.2.....

Infosys,

2 4891

1) int i=5; j=i++ + i++ + i++; printf("%d",j);This code gives the answer 15.But if we replace the value of the j then anser is different?why? 2)int i=5; printf("%d",i++ + i++ + i++); this givs 18.

IBPS, Infosys, TCS,

8 60409

Wrie a function which returns the most frequent number in a list of integers. Handle the case of more than one number which meets this criterion. public static int[] GetFrequency(int[] list)

Nagarro,

3 14869

Counting in Lojban, an artificial language developed over the last fourty years, is easier than in most languages The numbers from zero to nine are: 0 no 1 pa 2 re 3 ci 4 vo 5 mk 6 xa 7 ze 8 bi 9 so Larger numbers are created by gluing the digit togather. For Examle 123 is pareci Write a program that reads in a lojban string(representing a no less than or equal to 1,000,000) and output it in numbers.

4 8943

Where now stands that small knot of villages known as the Endians, a mighty forest once stood. Indeed, legand has it that you could have stoodon the edge of the wood and seen it stretch out for miles, were it not for the trees getting in the way. In one section of the forest, the trees stood in a row and were of hight from 1 to n, each hight occurring once and once only. A tree was only visible if there were no higher trees before it in the row. For example, if the heights were 324165, the only visible trees would have been those of height 3,4 & 6. Write a Program that takes an array of integers representing the heights of the trees in the row as input and prints the list of the visible trees.

ABC, Nagarro,

2 8122

How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com

Deshaw, Infosys,

11 35602

The sum of three numbers is 20. The second number is 4 times the first number , and the sum of the first and third is8. Find the numbers.

7 10178

How to get the version(major,minor,revision ) of VB6.0 delphi code .I am able to fetch dll file of vb6.0 but not vba file .Can u send me the code snippet in delphi to get the value for vb6.0.

3450

i wrote from two tables (employee and department) 1.select * from employee,department; (it is cartesian product) but 2.select * from employee department; (?????????????????) by default it displays the employee table,what is the reason it is not taking department ??? mail @ mak2786@gmail.com Arunkumar

1 3888

How to reverse a String without using C functions ?

Matrix, TCS, Wipro,

33 102049

How we will connect multiple client ? (without using fork,thread)

TelDNA,

3 6966

could you please tell me for what javac, javax,swing,awt.*; are using. what is the meaning and differences. and also there are 4 access modifiers in java. public, private, protected, default. what is the meaning of these 4 access modifiers and difference. public is the access modifier void means return data type disp() means function name what mean by static

Infosys,

1 4588

If basic HR function like recruitment, training are outsoureced then, why do companies have their own HR department?

Wellspring,

3 6728

how to print a message to console without using main() function?(do not use even static blocks also.)

Google, Zoho,

14 25937


Un-Answered Questions { Code Snippets }

Why XSLT is important for XML?

395


why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

2253


What is SAX in XML?

359


i have a gird with columns all are coming from database,this will bind in item templete in gridview as textboxex.and i have button below named Update.i want to update all the records in the grid,but if user change the value of one textbox,what is the easy way 2 do this

2137


What output does this program generate as shown? Why? class A { A() { cout << "A::A()" << endl; } ~A() { cout << "A::~A()" << endl; throw "A::exception"; } }; class B { B() { cout << "B::B()" << endl; throw "B::exception"; } ~B() { cout << "B::~B()"; } }; int main(int, char**) { try { cout << "Entering try...catch block" << endl; A objectA; B objectB; cout << "Exiting try...catch block" << endl; } catch (char* ex) { cout << ex << endl; } return 0; }

573






Write a program to model an exploding firecracker in the xy plane using a particle system

3683


Give the code for Handling Mouse Events?

1873


Code for using a Hot Key in an ActiveX Control?

1366


sample code to auto focusing the first field in a form

2026


Devise a program to implement the Fibonacci sequence.

529


Write a code snippet to display an integer in a binary format?

488


You have been asked to install a servlet engine (tomcat, glassfish, etc.) for a companies servlets. Assuming the company has an existing web/DBMS server (which may or may not be on the same server), explain in detail how would you implement the development project and a deployment solution.

2121


What is well formed XML document?

359


How can get all database name using Php and Sql?

1763


What is the functionality of SetForegroundWindow?

568