Programming Code Interview Questions
Questions Answers Views Company eMail

Write a program to Print the Pascal triangle

InterGraph,

516

Write a Program for matrix multiplication.

InterGraph,

498

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

InterGraph,

482

What output does the following code generate? Why? What output does it generate if you make A::Foo() a pure virtual function? class A { A() { this->Foo(); } virtual void Foo() { cout << "A::Foo()" << endl; } }; class B : public A { B() { this->Foo(); } virtual void Foo() { cout << "A::Foo()" << endl; } }; int main(int, char**) { A objectA; B objectB; return 0; }

632

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

571

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

int a=1; printf("%d %d %d",a++,a++,a); need o/p in 'c' and what explanation too

1 1158

Question 1: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date. *This Should Be Done IN C++

543

To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']

488

Ramesh’s basic salary is input through the keyboard. His dearness allowance is 40% of basic salary, and house rent allowance is 20% of basic salary. Write a program to calculate his gross salary.

1 1344


Un-Answered Questions { Programming Code }

What is the functionality of GetWindow?

581


How to get Dynamically Linked Comboboxes Set?

2017


c# code to Count number of 1's in a given range of integer (0 to n)

4292


To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']

488


How can I Create a C program in splitting set of characters to specific subsets. Example: INPUT SET OF CHARACTERS: Therefore, my dear brothers and sisters, stand firm. Let nothing move you. Always give yourselves fully to the work of the Lord, because you know that your labor in the Lord is not in vain. SPLIT INTO HOW MANY CHARACTERS PER SUBSETS: 10 OUTPUT: Therefore, my dear b rothers an d sisters, stand fir m. Let not hing move you. Alway s give you rselves fu lly to the work of t he Lord, b ecause you know that your labo r in the L ord is not in vain.

1922






1+1/2!+1/3!+...+1/n!

1935


1.What type of material can be sent from a Java servlet to a browser ? How does the browser know how to deal with the material? 2.Explain what happens to a servlet when a servlet engine is sent a GET request.

2362


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

2037


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

2911


write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used

4294


How to export 2 datatables of a single dataset to 2 different worksheets of a single MSExcel file ?

1935


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

486


find out the list of users who have access to all t-codes starts with 'SU'? thanks in advance all.

2015


Write a program to Print the Pascal triangle

516


Is it possible to write JAVA program without including any of the packages,such as "import java.io.*"; bcoz I instantly wrote a code without "import..." statement and runned the program on command Line & it worked. the code is: class Person { String name; int age; Person(String s,int a) { name = s; age = a; } accept() { System.out.println(name+"Hi!!!!!"); System.out.println(age); } } class Demo { public static void main(Strings args[])throws IOException { String name = args[0]; int age = Integer.parseInt(args[1]); Person p = new Person(name,age); p.accept(); } }

1763