Programming Code Interview Questions
Questions Answers Views Company eMail

For printing a message we use System.out.println in normal programs. We use String msg="text....."; Can't we use String msg=" " in normal programs and System.out.println("........") in applets. Please answer this question?

2115

write a program to sort 'n' elemnts using bubble sort

IBM,

1 7776

Write a complete program that consists of a function that can receive two numbers from a user (M and N) as a parameter. Then print all the numbers between the two numbers including the number itself. If the value of M is smaller than N, print the numbers in ascending flow. If the value of M is bigger than N, print the numbers in descending flow. may i know how the coding look like?

2 4139

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

3560

write a program in java to solve a system of n-variabled simultaneous equations using the guassian elimination method. let the maximum possible value of n be 100. run the program using hypothetical values for a set of 10- variables simultaneous equations. print out the program, the input equation and the results generated by the program.

TCS,

4175

write a program in c++ to scramble a bmp image file using a scramble key 0x7c and an XOR logic. print out the original image, the scrambled image and the program. Note: the first 24bytes of a bmp file contain the header information of the file.

1 5793

find A^B using Recursive function

2 5210

i want run following code on button click of view. i am trying to retrieve data from isc_order_details table and isc_product table. but after retriaval of data i m getting error like FIELD MUST BE ENTERED!! DECLARE m number; n number; CURSOR order_details IS SELECT PRODUCT_ORDER_QUAN,PRODUCT_ID FROM isc_order_details WHERE order_id=:isc_order_master.order_id; amount NUMBER (8,2):=0.0; alert number; BEGIN go_block('isc_order_details'); first_record; m:=:system.cursor_record; last_record; n:=:system.cursor_record; OPEN order_details; --for i in m..n loop FETCH order_details INTO :ISC_ORDER_DETAILS.PRODUCT_ORDER_QUAN,:ISC_ORDER_DETAIL S.PRODUCT_ID; IF order_details%FOUND THEN SELECT order_value,order_date INTO :ISC_ORDER_MASTER.ORDER_VALUE,:ISC_ORDER_MASTER.ORDER_D ATE FROM isc_order_master WHERE order_id=:ISC_ORDER_MASTER.ORDER_ID; SELECT product_desc,product_price INTO :ISC_ORDER_DETAILS.PRODUCT_DESC,:ISC_ORDER_DETAILS.PROD UCT_PRICE FROM isc_product WHERE product_id=:ISC_ORDER_DETAILS.PRODUCT_ID; next_record; END IF; EXIT WHEN order_details%NOTFOUND; END LOOP; last_record; CLOSE order_details; EXCEPTION when NO_DATA_FOUND then alert:=SHOW_ALERT('ENTER_DATA'); Go_Item('isc_order_master.order_id'); END;

Zensar,

1856

Write a C program to print look and say sequence? For example if u get the input as 1 then the sequence is 11 21 1211 111221 312211 12112221 .......(it counts the no. of 1s,2s etc which is in successive order) and this sequence is used in run-length encoding.

1 14165

Write a program that print in screen a tree with its height taken from user by entering number of 4 digits and find the odd numbers then calculate the sum of odd numbers so he get the height of tree?

2887

Hi, i have a project that the teacher want a pyramid of numbers in C# or java...when we click a button...the pyramid should be generated in a listbox/or JtextArea...and the pyramid should have the folowing form: 1 232 34543 4567654 567898765 67890109876 7890123210987 890123454321098 90123456765432109 0123456789876543210 Plz help with codes...didn't find anything on the net.

2650

Create a program to read two random data set in two files named data1.txt and data2.txt manifold contains integer numbers, whereas data2.txt file contains the float type numbers. Simpanlahmasing each into 2 pieces of data that is an array of type integer array and an array of type float, then calculate the average numbers in the second array.

2120

How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?

1992

Hello Sir, Thanks for the Solution but, can you pls. Explain the coding for the Static Function & static variable from the below coding....waiting for Ans. class fact { public static void Main() { fact f=new fact(); int x=1; //Declaration of x as 1 int k=Convert.ToInt32(Console.ReadLine()); for(int i=1;i<=k;i++) { x= x *i; } System.Console.WriteLine(x); } }

2013

write a program to input a natural number less than and display it in words.test your program on the sample data and some random data sample input= 29 sample output= Twenty nine sample input=17001 sample output= out of range sample input=119 sample output =one hundred and nineteen sample input=500 sample output=five hundred

3415


Un-Answered Questions { Programming Code }

why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

2222


How to find the list of users who have two codes su01 and pfcg? thank in advance all.

1676


Code for Document Validation in XML.NET?

1961


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.

1900


i am doing my final year project about programming use verilog ,i am new about it so got problem,i want to record the readings of a waveform every 2us use the verilog code ,every ten readings i need to add them together after that i need to compare this series of number to get which one is the biggest , right now i don't know how to use code to store the readings every 2us on a waveform ,pls help me thanks a lot .

1691






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(); } } } plzzzzzzz xplain me this java code like why i m including this packages n the whole code plzzzzzz

1937


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

495


Code for Communicating over Sockets?

1921


How to use Client-side Script to Focus Controls in ASP.NET?

2338


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.

2077


Write a Program in 'C' To Insert a Unique Number Only. (Hint: Just Like a Primary Key Numbers In Database.) Please Some One Suggest Me a Better Solution for This question ??

1747


Common UI for Multiple web applications. Suppose there are 35 websites using same third party controls.These 3rd party controls are made together that all 35 websites can use these controls.If we put all 3rd party controls and use its dll in 35 websites,only class files will be accessable. But I want to use CSS,images also in all 35 websites. how I can design the N-tier solution for this project.

2223


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.

2343


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

504


What is the functionality of EnumChildWindows?

468