Explain the working of strcmp and strcat function, C/C++ Programming

Explain the working of strcmp and strcat Function?

strcmp() : This function is meant to use to compare two strings.

The strcmp() function acknowledge two strings as arguments and returns an integer value and depending upon the relative order of the two strings as follows:

1. A negative value if the first string leads the second string alphabetically.
2. A value of zero if the first string and the second string are alike (disregarding case).
3. A positive value if the second string leads the first string alphabetically.

so if strcmp( string 1, string2) returns a positive value it would indicate that string2 must be moved placing it ahead of string 1 in order to alphabetize the two strings properly.


strcat() : This function is meant to use to concatenate two strings.

Posted Date: 6/13/2013 6:31:51 AM | Location : United States







Related Discussions:- Explain the working of strcmp and strcat function, Assignment Help, Ask Question on Explain the working of strcmp and strcat function, Get Answer, Expert's Help, Explain the working of strcmp and strcat function Discussions

Write discussion on Explain the working of strcmp and strcat function
Your posts are moderated
Related Questions
Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Write a Haskell program that calculates a balanced partition of N items where each item has a value between 0 and K such that the difference between the sum of the values of first

Operation on String - C ++ Program: Write a program to define operations on string in c++. class String {    char *char_ptr;   // pointer to string contents    int le

A skilled programmer is required to build a standalone module to extract, parse and store in database tables, word count data from web pages and RSS feeds. The module can take R

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Prepare a script for providing Instagram Followers/Likes I need to prepare a panel where my customer able to get Instagram followers or likes automatically. - A panel where I

1)      Factorial (for this question just provide an answer for each part)  1.1  Debug the following program to calculate N! #include using namespace std; main()

Project Description: Not just like that though. I want a similar program that can scan through poker lobbys (pokerstars, full tilt, ongame and ipoker) and seat me to the left of

Program to design list in c: Write a program in c to insert the values in list void main() { int i=0; char a[20]; clrscr(); printf("Enter the line\n");

Write a Program that illustrate union declaration? A C program encloses the following union declaration: union id { char color[12]; int size; } shirt, blouse; At this