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

784

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

664

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.

678

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

625

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

634

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

625

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

634

what is the structure of xml document ?

436

What is xml schema?

427

What is a cdata section in xml?

411

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

571

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

664

Write a program to reverse a number in python?

567

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

586

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

764


Un-Answered Questions { Code Snippets }

Given a table of the form: Product Sold on A 1/1/1980 B 1/1/1980 C 1/1/1980 A 1/1/1980 B 1/1/1980 C 2/1/1980 A 2/1/1980 There are 30 products and 10,000 records of such type. Also the month period during which sales happened is given to u. Write the program to display the result as: Product Month No. of copies A January 12 A February 15 A March 27 B January 54 B February 15 B March 10 C January 37

2409


How to call JavaScript Function from Code-behind in asp.net?

657


What is XSNL?

435


Write a python program to count the number of vowels in a string?

615


how to manage mlng timer because they don't explain what's it's function?

2582






What is SGML?

414


Write a python program to check if a number is a perfect number?

657


How can I include conditional statements in XML?

470


create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file

2425


What is a cdata section in xml?

411


how to pass data between pages using Frames

2339


how to create a search bar which access data from various websites and retrieves the data

2712


What is the functionality of EnumWindows?

546


Performance Algorithm A performs 10n2 basic operations and algorithm B performs 300 lg n basic operations. For what value of n does algorithm B start to show its better performance?

7597


How to add a value from textBox over an existing certain column in SQL Server

2442