.
 Vyom World.com  . Let's Touch the Sky Together!  
.
. . . . . . .
 Home
VyomWorld.com Home
Free Magazines!
VyomLinks.com Home
JobsAssist.com Home
Vyom Network
Contact Us
 Jobs & Careers
Resume Submitter
Placement Papers
IT Companies Directory
Computer Jobs
Interview Questions
Online Exams
Vyom Career eMag.
 Fun
Screensavers New!
Send FREE SMS!
SMS Jokes
 Source Codes Library
Source Codes Home
ASP Source Codes
C Source Codes
C++ Source Codes
COBOL Source Codes
Java Source Codes
Pascal Source Codes
Submit Source Codes
 GATE
GATE an Overview
GATE Preparation
Study Materal
 GRE
GRE an Overview
GRE Questions
GRE Preparation
GRE Universities
 TOEFL Preparation
TOEFL Resources
 GMAT Preparation
GMAT Resources
 MBA Preparation
MBA Resources
 Networking Concepts
Networking Concepts
 Testing Preparation
Testing Resources
 Webmasters
Free Traffic Builder
Webmaster Articles
Web Hosting
 Tutorials
Hardware Tutorial
1500 Free eBooks New!
 FREE Publications
Vyom Career eMag.
 
.
Get 9,000+ Interview Questions & Answers in an eBook.


  • 9,000+ Interview Questions
  • All Questions Answered
  • 5 FREE Bonuses
  • Free Upgrades

    Get it now!


    Post your Resume to 5800+ Companies

    Reliable Web Hosting

  •  
     
     
    Get 9,000+ Interview Questions with Answers in an eBook

    Advertisements
    Advertisements

    C Source Codes List | Source Code Home
    Program : Program to compare two input strings.
    /* Prg. to compare two input strings */ #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> char s1[80],s2[80]; int a,b; int strcmp(char *s,char *t); void main() { int c; clrscr(); printf("\t\t\tWELCOME TO THE PROGRAM SIR/MADAM\n\n\n"); printf("Enter string 1 :- "); gets(s1); printf("Enter string 2 :- "); gets(s2); c=strcmp(s1,s2); if (c==0) printf("Strings are similar."); else if (a>b) { printf("Strings are not similar."); printf("\nFirst string is lenthier than the second string."); } else if (b>a) { printf("Strings are not similar."); printf("\nFirst string is shorter than the second string."); } else printf("\nStrings are not similar though they are equal in length."); printf("\n\n\n\n\n\t\t\tHAVE A NICE DAY! BYE."); getch(); } int strcmp(char s[],char t[]) { int i; a=strlen(s1); b=strlen(s2); if (a>b) { for(i=0;*s!='\0';i++) { if (*s==*t) { *s=*(s+i); *t=*(t+i); } else return(*s - *t); } return(0); } else { for(i=0;*t!='\0';i++) { if (*s==*t) { *s=*(s+i); *t=*(t+i); } else return(*s - *t); } return(0); } }

     

    C Source Codes List | Source Code Home

     




     

    .

    Recently Updated: New Placement Papers added.
    Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Programming & Source Codes | GRE Preparation | Jobs, Discussions | Software Listing | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | International Business Information | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | FAQs | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Excellent Mobiles | Software Testing | Interview Questions | Freshers Jobs | Server Insiders | File Extension Directory

    Copyright ©2003-2024 Vyom Technosoft Pvt. Ltd., All Rights Reserved. Read our Privacy Policy