Code Snippets Interview Questions
Questions Answers Views Company eMail

What is XML Element?

487

What is a well formed XML document?

417

Which tag is used to find the version of XML and the syntax?

454

What is a valid XML document?

437

Write a Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

InterGraph,

639

Write a Program to truncate a given floating point value (e.g.16.25=16).

InterGraph,

663

Write a Program to find the sum of digits of a given number until the sum becomes a single digit.

InterGraph,

646

Write a Program to find whether the given number is a Armstrong number.

InterGraph,

623

Devise a program to implement the Fibonacci sequence.

Tech Mahindra,

658

Write a Program to find the number of words in a sentence.

InterGraph,

676

How can you print an address of a variable?

TCS,

654

Write a program to Print the Pascal triangle

InterGraph,

634

Write a Program for matrix multiplication.

InterGraph,

665

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

InterGraph,

617

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

840


Un-Answered Questions { Code Snippets }

plzzzzzzzzz xplain this code import java.awt.*; import java.awt.event.*; public class Agency extends Frame implements ActionListener { Label l1,l2,l3,l4; Button b1; TextField t1,t2; String s1,s2,s3,s4; public static void main(String args[]) { new Agency().setVisible(true); } public Agency() { super("Gas Agency Package"); setSize(1280,800); setBackground(Color.lightGray); setLayout(null); // setLayout(new BorderLayout()); t1=new TextField(20); t1.setBounds(440,150,200,30); t1.setBackground(Color.white); t2=new TextField(20); t2.setBounds(440,180,200,30); t2.setBackground(Color.white); t2.setEchoChar('*'); l1=new Label("Gas Agency Package"); l1.setBounds(400,30,300,50); l1.setFont(new Font("TimesRoman",Font.BOLD,25)); l1.setAlignment(Label.CENTER); l2=new Label("Enter your ID and Passoword"); l2.setFont(new Font("TimesRoman",Font.BOLD,20)); l2.setBounds(270,80,300,50); l3=new Label("Enter ID"); l2.setFont(new Font ("TimesRoman",Font.BOLD,20)); l3.setBounds(270,150,120,50); l4=new Label("Enter Passoword"); l2.setFont(new Font ("TimesRoman",Font.BOLD,20)); l4.setBounds(270,180,140,50); add(l1); add(l2); add(l3); add(t1); add(l4); add(t2); b1=new Button("Login"); b1.setBackground(Color.white); b1.setBounds(400,280,100,70); b1.addActionListener(this); add(b1); } public void actionPerformed(ActionEvent e) { if(e.getSource()==b1) { s3="svce"; s4="svce"; s1=t1.getText(); s2=t2.getText(); if(s1.equals(s3) && s2.equals(s4)) { //System.out.println("password is correct"); MenuForm m= new MenuForm(); m.setVisible(true); //this.dispose(); } else { System.out.println("password not correct"); } this.dispose(); } } } plzzzzzzzzz xplain this code

1707


write a program that reads a series of strings and prints only those strings begging with letter "b"

2861


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

2583


Give me some tips in c#?

2295


Hi, I want the code to fetch multiple rows in REXX using RLX and CURSOR. Can anyone help me?

2189






why nlogn is the lower limit of any sort algorithm?

2535


Definition of priority queue was given. We have to implement the priority queue using array of pointers with the priorities given in the range 1..n. The array could be accessed using the variable top. The list corresponding to the array elements contains the items having the priority as the array index. Adding an item would require changing the value of top if it has higher priority than top. Extracting an item would require deleting the first element from the corresponding queue. The following class was given: class PriorityQueue { int *Data[100]; int top; public: void put(int item, int priority); // inserts the item with the given priority. int get(int priority); // extract the element with the given priority. int count(); // returns the total elements in the priority queue. int isEmpty(); // check whether the priority queue is empty or not. }; We had to implement all these class functions.

4620


What are the special characters used in XML?

440


What is XML Element?

487


how to Auto Scroll the page

1778


Who is responsible for XML?

454


write a simple calculator c program to perform addition, subtraction, mul and div.

3375


Can you write a program to find the average of numbers in a list in python?

591


What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql

2618


write a code that user can choose/alter Body Text Size

1763