Code Snippets Interview Questions
Questions Answers Views Company eMail

Create a class called Accounts which has data members like ACCOUNT no, Customer name, Account type, Transaction type (d/w), amount, balance D->Deposit W->Withdrawal If transaction type is deposit call the credit(int amount) and update balance in this method. If transaction type is withdraw call debit(int amt) and update balance. Pass the other information like Account no,name,Account Type through constructor. Call the show data method to display the values.

Cognizant,

1 5881

int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().

1 4366

int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().

2 4477

There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.

TCS,

1 4062

Write a C program to print ‘Campus Force training’ without using even a single semicolon in the program.

Wipro,

3 7346

Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

iGate,

3274

is public static void main() work in java?is "String arg[]" needed as argument?

Tech Mahindra,

4 6324

‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }

2 4208

what is software testing

TCS,

1 3728

Write a program to check whether the number is prime and also check if it there i n fibonacci series, then return true otherwise return false

Cognizant, lenovo,

1 4816

using friend function find the maximum number from given two numbers from two different classes.write all necessary functions and constructor for the classes.

TCS,

1 17110

write a function to give demostrate the functionality of 3d in 1d. function prototye: change(int value,int indexX,int indexY,int indexZ, int [] 1dArray); value=what is the date; indexX=x-asix indexY=y-axis indexZ=z-axis and 1dArray=in which and where the value is stored??

Nagarro,

4155

There is a lucky draw held every day. if there is a winning number eg 1876,then all possible numbers like 1867,1687,1768 etc are the numbers that match irrespective of the position of the digit. Thus all these numbers qualify fr the lucky draw prize Assume there is no zero digit in any numbers. write a program to show all the possible winning numbers if a "winning number"is passed as an arguments to the function.

Nagarro,

1 7222

how to concatenate the two strings

1 3324

iam getting keyword or delimiter error while executing ICETOOL,provide me solution.

1382


Un-Answered Questions { Code Snippets }

function to combine two or more arrays

1709


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

3160


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

1965


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.

2376


Write a python program to find the second largest number in a list?

485






How can I Draw an ellipse in 3d space and color it by using graph3d?

2138


how to create a search bar which access data from various websites and retrieves the data

2558


Write a program to convert postfix expression to infix expression.

4114


Why XSLT is important for XML?

407


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

1614


What is well formed XML document?

366


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

936


Write a Program for matrix multiplication.

507


Give me some tips in c#?

2167


how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

3133