Search This Blog

Friday, September 23, 2011

write program for palindrome

FOR NUMBERS:

#include<stdio.h>
#include<conio.h>
void main()
{
int n,s=0,m;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(m==n)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}



FOR STRINGS:

#include<stdio.h>
#include<conio.h>
#include<string.h>
 
main()
{
   char a[100], b[100];
 
   printf("Enter the string to check if it is a palindrome\n");
   gets(a);
 
   strcpy(b,a);
   strrev(b);
 
   if( strcmp(a,b) == 0 )
      printf("Entered string is a palindrome.\n");
   else
      printf("Entered string is not a pailndrome.\n");
 
   getch();
   return 0;
}


USING DATA STRUCTURES:

#include<stdio.h>
 
int is_palindrome(char*);
void copy_string(char*, char*);
void reverse_string(char*);
int string_length(char*);
int compare_string(char*, char*);
 
main()
{
      char string[100];
      int result;
 
      printf("Enter a string\n");
      gets(string);
 
      result = is_palindrome(string);
 
      if ( result == 1 )
         printf("\"%s\" is a palindrome string.\n", string);
      else
         printf("\"%s\" is not a palindrome string.\n", string); 
 
      return 0;
}
 
int is_palindrome(char *string)
{
      int check, length;
      char *reverse;
 
      length = string_length(string);    
      reverse = (char*)malloc(length+1);    
 
      copy_string(reverse, string);
      reverse_string(reverse);
 
      check = compare_string(string, reverse);
 
      free(reverse);
 
      if ( check == 0 )
         return 1;
      else
         return 0;
}
 
int string_length(char *string)
{
   int length = 0;  
 
   while(*string)
   {
      length++;
      string++;
   }
 
   return length;
}
 
void copy_string(char *target, char *source)
{
   while(*source)
   {
      *target = *source;
      source++;
      target++;
   }
   *target = '\0';
}
 
void reverse_string(char *string) 
{
     int length, c;
     char *begin, *end, temp;
 
     length = string_length(string);
 
     begin = string;
     end = string;
 
     for ( c = 0 ; c < ( length - 1 ) ; c++ )
         end++;
 
 
     for ( c = 0 ; c < length/2 ; c++ ) 
     {        
         temp = *end;
         *end = *begin;
         *begin = temp;
 
         begin++;
         end--;
     }
}
 
int compare_string(char *first, char *second)
{
   while(*first)
   {
      if (*first == *second)
      {
         first++;
         second++;
      }     
      else
         return -1;
   }
 
   return 0;  
}


USING C++:

#include<iostream.h>
#include<string.h>

int main()
{
     char str[25],str1[25];	
     cout<<"Enter a string: ";
	
     gets(str);

     strcpy(str1,str);
     strrev(str);
	if(strcmp(str,str1)!=0)
	{
	     cout<<"string is not palindrome";
	}
	else
	{
	      cout<<"string is a palindrome";
	}

	  cout<<endl;


USING JAVA:

String s1=args[0];
String s2="";

for(int i=0; i<s1.length(); i++)
{
   s2=s2+charAt(i);
}
if(s1.equals(s2))
  System.out.println("Palindrome");
else
  System.out.println("Not Palindrome");
 

cubes and cuboids


Intrducion:
  • In a cube or a cuboid there are six faces in each.
  • In a cube length, breadth and height are same while in cuboid these are different.
  • In a cube the number of unit cubes = (side)3.
  • In cuboid the number of unit cube = (l x b x h).
Example:
A cube of each side 4 cm, has been painted black, red and green on pars of opposite faces. It is then cut into small cubes of each side 1 cm.
The following questions and answers are based on the information give above:
1. How many small cubes will be there ?
Total no. of cubes = (sides)3 = (4)3 = 64
2. How many small cubes will have three faces painted ?
From the figure it is clear that the small cube having three faces coloured are situated at the corners of the big cube because at these corners only three faces of the big cube meet.
Therefore the required number of such cubes is always 8, because there are 8 corners.
3. How many small cubes will have only two faces painted ?
From the figure it is clear that to each edge of the big cube 4 small cubes are connected and two out of them are situated at the corners of the big cube which have all three faces painted.
Thus, to edge two small cubes are left which have two faces painted. As the total no. of edges in a cube are 12.
Hence the no. of small cubes with two faces coloured = 12 x 2 = 24
(or)
No. of small cubes with two faces coloured = (x - 2) x No. of edges
where x = (side of big cube / side of small cube)
4. How many small cubes will have only one face painted ?
The cubes which are painted on one face only are the cubes at the centre of each face of the big cube.
Since there are 6 faces in the big cube and each of the face of big cube there will be four small cubes.
Hence, in all there will be 6 x 4 = 24 such small cubes (or) (x - 2)2 x 6.
5. How many small cubes will have no faces painted ?
No. of small cubes will have no faces painted = No. of such small cubes
= (x - 2)3 [ Here x = (4/1) = 4 ]
= (4 - 2)3
= 8.
6. How many small cubes will have only two faces painted in black and green and all other faces unpainted ?
There are 4 small cubes in layer II and 4 small cubes in layer III which have two faces painted green and black.
Required no. of such small cubes = 4 + 4 = 8.
7. How many small cubes will have only two faces painted green and red ?
No. of small cubes having two faces painted green and red = 4 + 4 = 8.
8. How many small cubes will have only two faces painted black and red ?
No. of small cubes having two faces painted black and red = 4 + 4 = 8.
9. How many small cubes will have only black painted ?
No. of small cubes having only black paint. There will be 8 small cubes which have only black paint. Four cubes will be form one side and 4 from the opposite side.
10. How many small cubes will be only red painted ?
No. of small cubes having only red paint = 4 + 4 = 8.
11. How many small cubes will be only green painted ?
No. of small cubes having only green paint = 4 + 4 = 8.
12. How many small cubes will have at least one face painted ?
No. of small cubes having at least one face painted = No. of small cubes having 1 face painted + 2 faces painted + 3 faces painted
= 24 + 24 + 8
= 56.
13. How many small cubes will have at least two faces painted ?
No. of small cubes having at least two faces painted = No. of small cubes having two faces painted + 3 faces painted
= 24 + 8
= 32.

Thursday, September 22, 2011

Freeware Music Players for Windows


Windows Operating System has its own Media Player. WMP (Windows Media Player) has the ability to RIP / Burn Audio CDs also. It is available for the Windows and Windows Phone Operating Systems.
Freeware Music Players for Windows
Freeware Music Players for Windows
We have many alternative players to WMP. Here I’m listing the best players. Each Player has its own special features.
VideoLAN VLC
Free Streaming and Multimedia solutions for all OS
KMPlayer
Excellent free multi-format media player.
WinAmp The Ultimate Media Player.
CopyTrans Manager
Faster, Lighter and free alternative iPod Manager.
MediaMonkey
Free Media Jukebox, Music Manager, CD Ripper & Converter.
Foobar2000
It is an advanced freeware audio player for the Windows platform. Some of the basic features include full unicode support, ReplayGain support and native support for several popular audio formats.
SongBird
Take your music with you, share playlists with friends, watch video.
Audacity
It is free, open source software for recording and editing sounds.
iTunes
That’s entertainment.
AllPlayer 
All formats video player with auto download features

விளையாட்டுப் பிரியர்களுக்கான Cheat Books Database மென்பொருள்



கணிணியில் விளையாடுவது ஒரு அலாதியான விசயம். பெரும்பாலானோர் வெற்றி பெறும் வரை வேட்கையோடு விளையாடுவோர்கள். சிலருக்கு லெவல்களை முடிக்க இயலாமல் தவித்துப் போய் வேறு வழி இருக்கிறதா என்று தேடுவார்கள். விளையாட்டுகளில் சில ரகசியச் சொற்களைக் கொடுப்பதன் மூலம் அடுத்த லெவலுக்கு முன்னேறலாம். அல்லது வேறு எதேனும் சக்திகளைப் பெறலாம். இந்த மாதிரி கொடுக்கப்படும் சொற்களே Cheat Codes என்று சொல்லப்படுகிறது. அதாவது விளையாட்டில் குறுக்கு வழியில் முன்னேற இதனைப் பயன்படுத்துவார்கள். 

கணிணியில் விளையாடப்படும் விளையாட்டுகள் ஆயிரக்கணக்கில் இணையத்தில் பகிரப்படுகின்றன. குறிப்பிட்ட விளையாட்டுக்கு Cheat codes வேண்டும் என்றால் நீங்கள் அதனை கூகிளில் தேடி கண்டுபிடிக்கலாம். இதற்கென இருக்கும் ஒரு மென்பொருள் தான் Cheat Books Database. இதில் 20000 க்கு மேற்பட்ட விளையாட்டுகளின் ரகசியச் சொற்கள் கொடுக்கப்பட்ட்டுள்ளன. சில முக்கியமான இடங்களில் எப்படி விளையாட வேண்டுமென்ற குறிப்புகளும் இதில் தரப்படுகிறது.

இது Database என்ற பெயருக்கேற்ப அனைத்து தகவல்களும் இதன் தரவுத்தளத்தில் சேர்க்கப்பட்டுள்ளன. இதன் மூலம் PC, Walkthroughs, Playstation, Playstation 2, Playstation 3, Sega, Nintendo 64, Nintendo DS, DVD, Gameboy Advance, Gameboy Color, N-Gage, Nintendo DS, XBox, XBox 360, iPhone, Gamecube, Dreamcast, Super Nintendo, Wii, Sony PSP போன்ற வெவ்வேறு வகையான கருவிகளில் விளையாடக்கூடிய விளையாட்டுகளின் குறிப்புகள் மற்றும் சீட் கோட்களை ஒரே இடத்தில் தொகுப்பாகப் பார்த்துக் கொள்ள முடியும்.

மேலும் உங்களுக்கு எதேனும் ரகசியச்சொற்கள் தெரிந்திருப்பின் இதிலேயே புதிதாக சேர்த்துக் கொள்ளலாம். குறிப்பிட்ட கால இடைவெளியில் இதனை அப்டேட் செய்து கொண்டால் அண்மைய குறிப்புகள் அனைத்தும் இந்த மென்பொருளில் இணைந்து விடும்.

இதில் எளிதாக விளையாட்டுகளின் வரிசைப் பட்டியல் கொடுக்கப்பட்டுள்ளது. எளிதாகத் தேடுவதற்கும் வசதியிருக்கிறது. இங்கிருந்தே குறிப்பிட்ட விளையாட்டுக்கு இணையத்திலும் தேடும் வசதியும் கொடுக்கப்பட்டுள்ளது. இந்த இலவச மென்பொருள் விளையாட்டுப் பிரியர்கள் பயன்படுத்திப் பார்க்க வேண்டிய மென்பொருள்.

தரவிறக்கச்சுட்டி: http://www.cheatbook.de/cheatbookdatabase2011.htm

INDIA'S IMPORTANT PHONE NUMBERS (இந்தியாவின் முக்கிய சில தொலைத்தொடர்பு எண்கள்)


Airlines
Indian Airlines -1800 180 1407
Jet Airways – 1800 22 5522
Spice Jet – 1800 180 3333
Air India — 1800 22 7722
Kingfisher – 1800 180 0101
============ =========
Banks
ABN AMRO -1800 11 2224
Canara Bank – 1800 44 6000
Citibank – 1800 44 2265
Corporation Bank – 1800 443 555
Development Credit Bank – 1800 22 5769
HDFC Bank – 1800 227 227
ICICI Bank – 1800 333 499
ICICI Bank NRI – 1800 22 4848
IDBI Bank – 1800 11 6999
Indian Bank – 1800 425 1400
ING Vysya – 1800 44 9900
Kotak Mahindra Bank – 1800 22 6022
Lord Krishna Bank – 1800 11 2300
Punjab National Bank – 1800 122 222
State Bank of India – 1800 44 1955
Syndicate Bank – 1800 44 6655
========== ========= =========
Automobiles
Mahindra Scorpio -1800 22 6006
Maruti – 1800 111 515
Tata Motors – 1800 22 5552
Windshield Experts – 1800 11 3636
============ ========= ====
Computers/IT
Adrenalin -1800 444 445
AMD – 1800 425 6664
Apple Computers – 1800 444 683
Canon – 1800 333 366
Cisco Systems – 1800 221 777
Compaq – HP – 1800 444 999
Data One Broadband – 1800 424 1800
Dell – 1800 444 026
Epson – 1800 44 0011
eSys – 3970 0011
Genesis Tally Academy – 1800 444 888
HCL – 1800 180 8080
IBM – 1800 443 333
Lexmark – 1800 22 4477
Marshal’s Point – 1800 33 4488
Microsoft – 1800 111 100
Microsoft Virus Update – 1901 333 334
Seagate – 1800 180 1104
Symantec – 1800 44 5533
TVS Electronics – 1800 444 566
WeP Peripherals – 1800 44 6446
Wipro – 1800 333 312
Xerox – 1800 180 1225
Zenith – 1800 222 004
============ ========= ==
Indian Railway Enquiries
Indian Railway General Enquiry 131
Indian Railway Central Enquiry 131
Indian Railway Reservation 131
Indian Railway Railway Reservation Enquiry 1345,1335,1330
Indian Railway Centralised Railway Enquiry 1330/1/2/3/4/ 5/6/7/8/9
============ ========= ========= ========= =========
Couriers/Packers &amp; Movers
ABT Courier -1800 44 8585
AFL Wizz – 1800 22 9696
Agarwal Packers &amp; Movers – 1800 11 4321
Associated Packers P Ltd – 1800 21 4560
DHL – 1800 111 345
FedEx – 1800 22 6161
Goel Packers &amp; Movers – 1800 11 3456
UPS – 1800 22 7171
============ ========= ========= ======
Home Appliances
Aiwa/Sony -1800 11 1188
Anchor Switches – 1800 22 7979
Blue Star – 1800 22 2200
Bose Audio – 1800 11 2673
Bru Coffee Vending Machines – 1800 44 7171
Daikin Air Conditioners – 1800 444 222
DishTV – 1800 12 3474
Faber Chimneys – 1800 21 4595
Godrej – 1800 22 5511
Grundfos Pumps – 1800 33 4555
LG – 1901 180 9999
Philips – 1800 22 4422
Samsung – 1800 113 444
Sanyo – 1800 11 0101
Voltas – 1800 33 4546
WorldSpace Satellite Radio – 1800 44 5432
============ ========= ========= =========
Investments/ Finance
CAMS -1800 44 2267
Chola Mutual Fund – 1800 22 2300
Easy IPO’s – 3030 5757
Fidelity Investments – 1800 180 8000
Franklin Templeton Fund – 1800 425 4255
J M Morgan Stanley – 1800 22 0004
Kotak Mutual Fund – 1800 222 626
LIC Housing Finance – 1800 44 0005
SBI Mutual Fund – 1800 22 3040
Sharekhan – 1800 22 7500
Tata Mutual Fund – 1800 22 0101
============ ========= =========
Travel
Club Mahindra Holidays -1800 33 4539
Cox &amp; Kings – 1800 22 1235
God TV Tours – 1800 442 777
Kerala Tourism – 1800 444 747
Kumarakom Lake Resort – 1800 44 5030
Raj Travels &amp; Tours – 1800 22 9900
Sita Tours – 1800 111 911
SOTC Tours – 1800 22 3344
============ ========= ========= ====
Healthcare
Best on Health -1800 11 8899
Dr Batras – 1800 11 6767
GlaxoSmithKline – 1800 22 8797
Johnson &amp; Johnson – 1800 22 8111
Kaya Skin Clinic – 1800 22 5292
LifeCell – 1800 44 5323
Manmar Technologies – 1800 33 4420
Pfizer – 1800 442 442
Roche Accu-Chek – 1800 11 45 46
Rudraksha – 1800 21 4708
Varilux Lenses – 1800 44 8383
VLCC – 1800 33 1262
============ ========= ========= ===
Insurance
AMP Sanmar -1800 44 2200
Aviva – 1800 33 2244
Bajaj Allianz – 1800 22 5858
Chola MS General Insurance – 1800 44 5544
HDFC Standard Life – 1800 227 227
LIC – 1800 33 4433
Max New York Life – 1800 33 5577
Royal Sundaram – 1800 33 8899
SBI Life Insurance – 1800 22 9090
============ ========= ========= =======
Hotel Reservations
GRT Grand -1800 44 5500
InterContinental Hotels Group – 1800 111 000
Marriott – 1800 22 0044
Sarovar Park Plaza – 1800 111 222
Taj Holidays – 1800 111 825
============ ========= ========= ======
Teleshopping
Asian Sky Shop -1800 22 1800
Jaipan Teleshoppe – 1800 11 5225
Tele Brands – 1800 11 8000
VMI Teleshopping – 1800 447 777
WWS Teleshopping – 1800 220 777
============ ========= ========= ========
Others
Domino’s Pizza -1800 111 123
============ ========= ========= ====
Cell Phones
BenQ -1800 22 08 08
Bird CellPhones – 1800 11 7700
Motorola MotoAssist – 1800 11 1211
Nokia – 3030 3838


courtesy:
http://www.techtamil.com/news-in-tamil/technology-news-in-tamil/indain-important-contact-number/