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 5861

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 4336

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 4417

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 4038

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

Wipro,

3 7312

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,

3260

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

Tech Mahindra,

4 6286

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

2 4175

what is software testing

TCS,

1 3693

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 4796

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 17082

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,

4133

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 7204

how to concatenate the two strings

1 3294

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

1382


Un-Answered Questions { Code Snippets }

sample code to auto focusing the first field in a form

2026


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?

2140


What are the advantages of XML DOM Document?

361


Write a python program to check if a number is a strong number?

439


Write a code snippet to display an integer in a binary format?

488






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

2016


program to bring a window to the front

1560


write a c program which takes 20 numbers in an array as input from user and rearrange them in two different array defining even or odd

2592


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.

4196


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

2660


Bubble Sort. java thereafter the user will be asked to inpout the size of the list,sort the list in ascending order and display the sorted list in a horizontal manner???

2508


Which keyword is alias for count keyword in php?

1676


how to take time as input in the format (12:02:13) from user so that controls remains between these columns?

1809


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


1.What happens to a session object when the browser associated with it is closed? 2. Explain what happens when a servlet is sent a POST request? 3. Why does only one copy of a servlet get created? 4. Explain what happens when a browser requests a servlet? (for the first time) 5.How is information stored in a session object?

2040