How to reverse a string through programming( In C, C#, JAVA)

If you want to reverse a string , just take a string variable and a character array and the length of the array must be same as the length of string , You can achieve this by finding the length of string. And then store the string into character array.
Now to display the string in reverse manner, Just print the array from last index to first index!!!
The example is shown here, it is in C#, you can change it into any of language by just changing the syntax.




using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            string _myString;
            Console.WriteLine("Enter any string ");
            _myString = Console.ReadLine();
            int _length = _myString.Length;
            char[] _reverse = new char[_length];
            for (int i = 0; i < _length; i++)
            {
                _reverse[i] = _myString[i];
            }
            for (int i = _length-1; i >= 0; i--)
            {
                Console.Write(_reverse[i]);
            }
            Console.ReadLine();
        }
    }
}


Change the Admin Password of Windows-XP without knowing the password!!!

So here is the Trick with the help, You can change the password without knowing the Password.. The only condition is that you must be Log-in into Windows first. Then follow the steps...

Step 1 : Go to START MENU-->RUN

Step 2 : Just type there " control userpasswords2"

here you will get a window, You can change the password here without entering the previous one.

Now enjoy!!!

Java Tutorial : Switch case( Without break; ).

To choose one option from several available options, we can use switch statement. Dependiong on the selection option, a perticular task can be performed.

Syntax:


       switch(variable)
         {
               case value1 : statements;
               case value2 : statements;
               case value3 : statements;
               case value4 : statements; 
               [default       : Default statements];
          }


Here depending upon the value of the case perticular statement will be executed. And if there is no value match then default statement will get executed.


Example :


class switchcase
        {
                 public static void main(String[] args)
                      {
                             char color = 'g';
                             switch(color)
                                   {


                                          case 'b' : System.out.println(" Blue ");
                                          case 'r' : System.out.println(" Red ");
                                          case 'g' : System.out.println(" Green ");
                                          default : System.out.println(" No Color "); 
                                   }
                       }
}


Here the output will be as :
Blue
Red 
Green 
No Color


because after executing first statements command will be transfered to next statements.To stop this we have to use BREAK statements aboout wich we will learn on next Tutorial... :)

Java Tutorial : For-Each Loop

This loop is specially  designed for collection elements. Collection means a group of elements. For example , we can take an array as a collection or any class in java.util package can be considered as a collection. The reason is that an array stores a group of elements like integer values or strings.

Syntax:

         for(val : collection)
                   {
                            statements;
                    }



Here , the var is attached to the collections.This var repersents each element of the collection one by one.

Example : here is a programe to see the use of for-each loop and retrieve the elements one by one from an array and display it.

//using for each loop to display array elements

class demo
    {
           public static void main(String[] args)
                  {
                        //Declare an array with 4 elements
                      
                        int arr[] = {210, 540,230,-23};
                       
                       // Use of  for-each Loop
                        
                        for(int i : arr)
                                 {
                                           System.out,println(i);
                                  }


                  }
      }

All Secret codes of NOKIA mobiles.

Basically people are only aware of the some simple codes of nokia mobiles whichdoes not have so much of uses for example *#06# to know the IMEI number of the mobile. But they are not aware of the secret codes which is related to formatting the devices or many other purpose. So below is some codes and description of that codes based on its usage.

noki
                                
 *#06#                                This is the basic code used to display the IMEI Number of the mobile.

*#7780#                             This code is used to restore the settings of mobile to its deafault level.

*#746025625#                   This is the code used to stop the sim clock.

*#3283#                             This code will verify the manufacturer date.

0001-2
                         
*#7760#                              Production serial number will be displayed by this code.

*#0000#                              This code is used to display the mobile software version.

*#73#                                  This is use to reset game scores and phone timers of the mobile.

*#92702689#                      To display the Serial no, Made,Purchasing,Repaired date, Life time etc.

*#bta0#                               Use to display Bluetooth MAC address

*#9999#                              Mobiles software version will be displayed through this codes.

*#147#                                Vodafone customer will get help through this code about last call detail.

*#7328748263373738#      This will apply reset to the default security code.

*#43#                                  This will help you to verify the call waiting statu.

*#2820#                              This is used to get information about the bluetooth device on your mobile.

*#7370#                              To format the mobile phone memory

*#delset#                             To delete the GPRS AND EMAIL settings

*#67705646#                      This code will delete the operator logo.

#pw+1234567890+1#         This code will help you to display the lock status of mobile set

#pw+1234567890+4#         This code will help you to display the lock status of your SIM