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

793

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

682

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.

694

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

640

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

652

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

639

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

647

what is the structure of xml document ?

451

What is xml schema?

440

What is a cdata section in xml?

425

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

581

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

684

Write a program to reverse a number in python?

582

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

606

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

770


Un-Answered Questions { Code Snippets }

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.

2238


write a function that allocates memory for a single data type passed as a parameter.the function uses the new operator and return a pointer to the allocated memory.the function must catch and handle any exception during allocation

2633


how to Auto Scroll the page

1799


What is the functionality of SetForegroundWindow?

580


Using C# Write a program that performs the following. The user inputs a number and then enters a series of numbers from 1 to that number. Your program should determine which number (or numbers) is missing or duplicated in the series, if any. For example, if the user entered 5 as the initial number and then entered the following sequences, the results should be as shown. Input Sequence Output ---------------------- --------------- 1 2 3 4 5 Nothing bad However, if 7 were the high number, the user would see the results on the right for the following number entries: Input Sequence Output ---------------------- --------------- 1 3 2 4 5 Missing 6 Missing 7 And if 10 were the high number and the user entered the numbers shown on the left, note the list of missing and duplicate numbers: Input Sequence Output ---------------------- --------------- 1 2 4 7 4 4 5 10 8 2 6 Duplicate 2 ( 2 times) Missing 3 Duplicate 4 ( 3 times ) Missing 9 The program should check the high number that the user inputs to ensure that it does not exceed the size of any array you might be using for storage.

3937


How can you print an address of a variable?

665


write a program in java to find the moving average of all prime numbers between 2 and 100.

3796


Code for Communicating over Sockets?

2110


Code for Document Validation in XML.NET?

2147


What is the functionality of GetWindowTextLength?

603


plz send code for feature rich resume builder in j2ee frontend:J2EE Backend: DB2 Express

3420


Write a script to delete all the files in a folder except one desired file.

1104


write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30

2449


Write a Program to find the reverse of a given number.

636


Code for Searching for Multiple Matches with the MatchCollection Class?

3185