Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


program to reverse the order of words in a string.

Answers were Sorted based on User's Feedback



program to reverse the order of words in a string...

Answer / hrushikesh

Public Class Form1

Private Sub Button1_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Dim str As String
Dim words As String()

str = TextBox1.Text
words = Split(str)

Label1.Text = String.Empty

For i As Integer = words.Length - 1 To 0
Step -1
Label1.Text += words(i) + " "
Next
End Sub

Is This Answer Correct ?    4 Yes 7 No

program to reverse the order of words in a string...

Answer / snehu

import java.io.*;
import java.lang.*;

public class StringReverse
{
public static void main(String[] args)throws Exception
{
String words = "hi frends........ welcome to my
world";


String reverse = new StringBuffer(words).reverse
().toString();


System.out.println("Normal : " + words);

System.out.println("Reverse: " + reverse);
}
}

Is This Answer Correct ?    3 Yes 12 No

Post New Answer

More C Sharp Code Interview Questions

Write a program to input an integer and - display the reverse - display the sum of each digit - should include logic that considers the input number as any number of digits long

2 Answers   Mind Tree,


how to change password in .net with c # with ado.net and also SQL server 2008 change password

1 Answers  


How to pass multiple rows from one gridview to another gridview after clicking the checkbox.

1 Answers   Satyam,


Write a program to count 3Letter, 4Letter and 5Letter words from a file and print the number of 3Letter, 4Letter and 5Letter words. Delimiter is space, tab, hifen. Also we should not consider the line in the file after we encounter # in that line.

0 Answers   Mind Tree,


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.

1 Answers   Cognizant,


write a Program to copy the string using switch case.

0 Answers   Mind Tree, Wipro,


Code for Reading and writing from a file?

0 Answers   IBM, Xoriant,


IS Array list is generic or non generic

1 Answers  


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

1 Answers   Mind Tree,


How to Link Different Data Sources Together?

0 Answers  


Code for Working with Files under a Directory?

1 Answers  


Using C# Write a program that performs the following. The user inputs a number and then enters a series of numbers from 1 to that number. Your program should determine which number (or numbers) is missing or duplicated in the series, if any. For example, if the user entered 5 as the initial number and then entered the following sequences, the results should be as shown. Input Sequence Output ---------------------- --------------- 1 2 3 4 5 Nothing bad However, if 7 were the high number, the user would see the results on the right for the following number entries: Input Sequence Output ---------------------- --------------- 1 3 2 4 5 Missing 6 Missing 7 And if 10 were the high number and the user entered the numbers shown on the left, note the list of missing and duplicate numbers: Input Sequence Output ---------------------- --------------- 1 2 4 7 4 4 5 10 8 2 6 Duplicate 2 ( 2 times) Missing 3 Duplicate 4 ( 3 times ) Missing 9 The program should check the high number that the user inputs to ensure that it does not exceed the size of any array you might be using for storage.

0 Answers  


Categories
  • ASP.NET Code Interview Questions ASP.NET Code (46)
  • VB.NET Code Interview Questions VB.NET Code (9)
  • C Sharp Code Interview Questions C Sharp Code (51)
  • ADO.NET Code Interview Questions ADO.NET Code (8)