Code Snippets Interview Questions
Questions Answers Views Company eMail

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; }

570

Write a program that will convert an integer pointer to an integer and vice-versa.

513

Write a program that implements a date class containing day, month and year as data members. Implement assignment operator and copy constructor in this class.

533

Write code that allows to create only one instance of a class?

484

Write code to add functions, which would work as get and put properties of a class?

486

Write code to make an object work like a 2-d array?

469

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

488

what is the structure of xml document ?

338

What is xml schema?

336

What is a cdata section in xml?

322

How to print sum of the numbers starting from 1 to 100?

435

Write a python program to swap the first and last value of a list?

507

Write a program to reverse a number in python?

453

Write a python program to check common letters in two input strings?

481

What is the output when we execute list(“hello”)?

620


Un-Answered Questions { Code Snippets }

Write a function that takes an integer and returns the smallest number that is greater than the given number which is a palendrome. For example, if the input was 111 the next palindromic number would be 121.

1396


How can a procedure fetch data from FTP? I need a general code for this..

1361


code to positioning of window in certain dimensions

1659


What is CDATA?

356


How can you relate the function with the structure? Explain with an appropriate example.

2911






What is GUID anyway?

573


How can manage theme in php?

2023


How do you set a global variable inside a function?

452


What is XML DOM?

397


iam getting keyword or delimiter error while executing ICETOOL,provide me solution.

1382


How can get all database name using Php and Sql?

1758


How can you print an address of a variable?

501


What is used of serialize and unserialize in php?

2567


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

6300


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.)

2372