Code Snippets Interview Questions
Questions Answers Views Company eMail

Write A C++ Program To Input A Number Between 20 To 99 And Display Its Numbername?

TCS,

3 8750

print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!

TCS, VI eTrans, Tata Elxsi,

34 27690

print numbers till we want without using loops or condition statements like specifically(for,do while, while swiches, if etc)!

Wipro,

11 12161

Give a oneline C expression to test whether a number is a power of 2?

Google, Motorola, EA Electronic Arts,

25 22275

How to return multiple values from a function?

7 36913

How to access command-line arguments?

4 4605

How to read a directory in a C program?

4 9132

Find your day from your DOB?

Accenture, Microsoft,

15 8325

How to Connect and Insert Record to MYSQL using PHP?

6 9076

Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.

Microsoft,

9 12963

How to read MS-word document in java without displaying junk (unnecessary) data?

Cognizant,

5 13716

how can u draw a rectangle in C

Accenture, TCS, HCL, Oracle, Wipro, Cognizant, Punjab National Bank, SAP Labs, CO, Codeblocks, University,

53 75836

How to send e-mail from an ASP.NET application?

Wipro, DataPoint, Persistent, Infosys, TCS, Radar,

16 23399

how to return a multiple value from a function?

Wipro,

5 4610

how to return a multiple value from a function?

Wipro,

2 4018



Un-Answered Questions { Code Snippets }

write a program using virtual function to find the transposing of a square matrix?

1669


Find out the list of roles which gives access to all t-codes in SAP? Thanks in advance.

1038


how exactly is the lngColour used?

916


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

1016


code to positioning of window in certain dimensions

756


U hv to enter a range from a and b and search hw many no. of times a pattern n. occurs between the range a and b. Eg :i/p:enter range :0 100 Enter pattern: 13 o/p: the no. times 13 occurred betwwn 0 to 100:1 Eg :i/p:enter range :100 1000 Enter pattern: 13 o/p: the no. times 13 occurred betwwn 100 to 1000: (in this 13,113,131,132,133…139,213,313,…913 all these will be counted)

1019


can any body give me answer to this question please? please give me code in cl with the folling specifications. 1.Accept 2 parameters-date and date type 2.If date type is J then convert date to *MDY format 3.If date type is M convert date to *JUL format 4. Send a program message with the value of converted date? Please give me the answer.Because im practicing in my house.Im taking trining on AS/400.

1067


Develop a routine to reflect an object about an arbitrarily selected plane

1504


Given a N by N matrix of both negative and positive integers. Write an efficient algorithm to find the sub-matrix with the largest sum of all the contained elements.

384


Write a program to model an exploding firecracker in the xy plane using a particle system

2413


I'm calling a JS fcn that fires AJAX to a webmethod and returns a boolean. How do I retrieve the return value in the codebehind? (VB) I can set a hiddenfield value in the JS, but if it's async how can my VB know when it's changed?

330


Code to Block submission of form by pressing Enter Key

1213


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

2953


plzzzzzzzzz xplain this code import java.awt.*; import java.awt.event.*; //import java.awt.MenuItem.*; public class MenuForm extends Frame implements ActionListener { MenuBar mb=new MenuBar(); Menu m1=new Menu("Master"); Menu m2 =new Menu("Transactions"); Menu m3=new Menu("Queries"); Menu m4=new Menu("Reports"); Menu m5=new Menu("Daily/Weekly"); Menu m6=new Menu("Housekeeping"); Menu m7=new Menu("About"); Menu m8=new Menu("Utilities/Tools"); Menu m9=new Menu("exit"); MenuItem m11=new MenuItem("consumer master"); MenuItem m12=new MenuItem(""); MenuItem m13=new MenuItem(""); MenuItem m21=new MenuItem("New Connection"); MenuItem m22=new MenuItem("Refill Booking"); MenuItem m23=new MenuItem("Shop Delivery"); MenuItem m51=new MenuItem("Mrk Dlry"); MenuItem m91=new MenuItem("Quit"); /*MenuItem m131=new MenuItem(" "); MenuItem m132=new MenuItem(" "); MenuItem m134=new MenuItem(" ");*/ Font f=new Font("TimesRoman",Font.BOLD,16); Frame f1; public static void main(String args[]) { new MenuForm().setVisible(true); } public MenuForm() { super("Gas Agency Main Menu"); setSize(1280,800); setBackground(Color.lightGray); setLayout(null); setMenuBar(mb); /*m1.setFont(new Font("TimesRoman", Font.BOLD,16)); m2.setFont(new Font("TimesRoman", Font.BOLD,16)); m3.setFont(new Font("TimesRoman", Font.BOLD,16));*/ mb.add(m1); mb.add(m2); mb.add(m3); mb.add(m4); mb.add(m5); mb.add(m6); mb.add(m7); mb.add(m8); mb.add(m9); m1.add(m11); m1.add(m12); m1.add(m13); m2.add(m21); m2.add(m22); m2.add(m23); m5.add(m51); m9.add(m91); //m3.add(m31); /*m13.setEnabled(false); m13.add(m131); m13.add(m132); m13.add(m133); m13.add(m134); m13.add(m135);*/ setVisible(true); /*m11.addActionListener(this); m12.addActionListener(this); m13.addActionListener(this); m2.addActionListener(this); m3.addActionListener(this);*/ m21.addActionListener(this); m22.addActionListener(this); m23.addActionListener(this); /*m31.addActionListener(this); m131.addActionListener(this); m132.addActionListener(this); m133.addActionListener(this); m134.addActionListener(this); m135.addActionListener(this);*/ m51.addActionListener(this); m91.addActionListener(this); } public void actionPerformed(ActionEvent e) { /*if(e.getSource()==m11) { } if(e.getSource()==m12) { } if( (e.getSource()==m131) || (e.getSource() ==m132) || (e.getSource()==m133) || (e.getSource()==m134) || (e.getSource()==m135) ) { }*/ if(e.getSource()==m21) { NewConnection nc=new NewConnection (); nc.setVisible(true); this.dispose(); } if(e.getSource()==m22) { RefillBooking rb=new RefillBooking (); rb.setVisible(true); this.dispose(); } if(e.getSource()==m23) { ShopDelivery sd=new ShopDelivery(); sd.setVisible(true); this.dispose(); } if(e.getSource()==m51) { MarkDelivery mrk=new MarkDelivery(); mrk.setVisible (true); this.dispose(); } if(e.getSource()==m91) { this.dispose(); System.exit(0); } } }

793


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

1555