Answer Posted / darshana
Dim num As String
Dim ch() As Char
Dim ch1() As Char
Console.WriteLine("enter the number")
num = Console.ReadLine()
ch = num.ToCharArray
ch1 = num.ToCharArray
' For i As Integer = 0 To ch.Length - 1
Array.Reverse(ch)
If ch = ch1 Then
Console.WriteLine("palindrome")
Else
Console.WriteLine("not palindrome")
End If
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Explain what is the stack?
What is wrong in this statement?
What are structure types in C?
How can a program be made to print the name of a source file where an error occurs?
What is binary tree in c?
How to declare pointer variables?
What does static variable mean in c?
Explain data types & how many data types supported by c?
What is pivot in c?
Can a local variable be volatile in c?
What is the use of function in c?
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
Which is better malloc or calloc?
Are c and c++ the same?
What will be the outcome of the following conditional statement if the value of variable s is 10?