program to reverse the order of words in a string.
Answers were Sorted based on User's Feedback
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 |
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 |
Hello I am hosting remoting within IIS. Everything works just fine as long as I allow anonymous access at the IIS level. When I allow only Windows Authenticated sessions, something very strange happens: If the client activates the remote object with IP address - works fine If the client activates it using a machine name - get http 401 exception is thrown. The exception is thrown when the client calls the remote method. I set the channel's useDefaultCredentials property to true. Any idea how to allow Windows Authentication? Here is the call stack: System.Net.WebException: The remote server returned an error: (401) Unauthorized .. ---> System.ComponentModel.Win32Exception: The target principal name is incorrect at System.Net.NTAuthentication.GetOutgoingBlob(Byte[] incomingBlob, Boolean handshakeComplete) at System.Net.NTAuthentication.GetOutgoingBlob(String incomingBlob, Boolean handshakeComplete) at System.Net.NegotiateClient.DoAuthenticate(String challenge, WebRequest webRequest, ICredentials credentials, Boolean preAuthenticate) at System.Net.NegotiateClient.DoAuthenticate(String challenge, WebRequest webRequest, ICredentials credentials, Boolean preAuthenticate) at System.Net.NegotiateClient.Authenticate(String challenge, WebRequest webRequest, ICredentials credentials) at System.Net.AuthenticationManager.Authenticate(String challenge, WebRequest request, ICredentials credentials) at System.Net.AuthenticationState.AttemptAuthenticate (HttpWebRequest httpWebRequest, ICredentials authInfo) --- End of inner exception stack trace ---
. Write a program to print the following outputs using for loops $ $ $ $ $ $ $ $ $ $ $ $ $ $ $
How to export 2 datatables of a single dataset to 2 different worksheets of a single MSExcel file ?
program to reverse the order of digits in a given number of any length.
program for straight line(y=mx+c)
how to change password in .net with c # with ado.net and also SQL server 2008 change password
Code for IP Address Comparison and Conversion in C#?
Event Handling in C# Triggering a Button
Can you declare an array of mixed Types?
Coding for Manipulate XML File Data Using C#?
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); } }
how does the below eqation proceed to be solved: x*=y+z options: x=x*y+z or x=x*(y+z)