Code Snippets Interview Questions
Questions Answers Views Company eMail

How to maintain session in Jsp?

IBM,

4 5586

I have this code in leftmenu.ascx page..now on leftmenu.ascx.cs page i want to access id values. but i dont want to check manually like Accommodation,Arts etc.. In cs file my code is like string str[]; //this array contains some values say 10 strings for(i=0;i<100;i++) { if(str[i]==id id.visible=true } i.e.i want to travel for each element of str and each value of id.if they match then id.visible=true how to do?

3822

I have string str="Arts And Props" now i want to replace space in string with null. means i want result as str="ArtsAndProps"

1 3398

How can I create connection two blue-tooth mobile in j2me. please urgent

1926

Code for 1>"ascii to string" 2>"string to ascii"

Aricent, Global Logic,

1 4726

Here's the programm code: int magic(int a, int b) { return b == 0 ? a : magic(b, a % b); } int main() { int a, b; scanf("%d%d", &a, &b); printf("%d\n", magic(a, b)); return 0; } on input stream we have integers 4, 45 What's the output integer? How many times will be initiated "magic" function?

1 3322

given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit

8 28771

Write a function which accepts a sentence as input parameter.Each word in that sentence is to be reversed. Space should be there between each words.Return the sentence with reversed words to main function and produce the required output. for eg:- i/p: jack jill jung kill o/p: kcaj llij gnuj llik

Mind Tree,

1 6847

Write a program which has a function and that function should take 2 or 3 or any number of strings and it should return the largest common prefix of all those strings. If there is no common prefix it should return an empty string. for eg:- INPUT OUTPUT glo {glory,glorious,glod} gl {glad,glow} {calendar,phone} empty string

Mind Tree,

2 5325

Write a function which accepts list of nouns as input parameter and return the same list in the plural form. Conditions: i) if last letter is r then append s ii) if word ends with y then replace it by ies iii) call this function in main() and produce the required output. for eg:- if chair is input it should give chairs as output.

Mind Tree,

3991

program to reverse the order of words in a string.

Mind Tree,

2 9703

program to reverse the order of digits in a given number of any length.

Mind Tree,

1 6545

program to check if a number is "perfect number".

Mind Tree, SoftSol,

1 8826

program for addition of fraction(M/N + P/Q = Y/Z)

Mind Tree,

1 4967

program for string reverse(eg:- i am boy -> boy am i)

Black Pepper, Infosys, Mind Tree,

8 16801


Un-Answered Questions { Code Snippets }

how to pass data between pages using Frames

2155


I have a doubt regarding including tags in a function. I have written a function in javascript in a html page. The function got called by clicking a button, i want to display the results in same html page by placing tags in the function. (this hmtl page is static page) Is this possible? example:


What are the advantages of XML DOM Document?

369


how to write a program that opens a file and display in reverse order?

2568


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

530


how to create a Draggable element

1976


solve the problem in the programming language C++"if a five digit number is input through the keyboard.Write a program to calculate the sum of its digits(hint: use the modulus operator)

2937


Question 1: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date. *This Should Be Done IN C++

553


What is XQuery?

362


How can restrict user to type upto 8 characters in textbox in php?

1576


How can I create connection two blue-tooth mobile in j2me. please urgent

1926


determine which Element received an Event

1909