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
Draw a circle in c program: void main() { clrscr(); int i,r=50,t,j,x,y; int gd,gm; gd =DETECT; initgraph(&gd,&gm,""); for(x=50;x for(y=50;y {   i


Respected Sir, I want the above written text in a C program

Consider the following algorithm to generate a sequence of numbers. Start with an integer n. If n is even, divide by 2. If n is odd, multiply by 3 and add 1. Repeat this process wi

2 flowcharts, pseudocode for each (at least 4 algorithms), and code for either a stack or a queuestion..

Explain the Defination and Declaration of Union? Generally in terms the composition of a union may be defined as be as union tag { member 1; member 2; member m; }; Wh

We need an E Commerce site likefifacointrader. you must have experience with that kind of work You have to show a sample of work like that site. Skills required are C Prog

#question.develop an algorithm using pseudocode for computing cos(x) and sin(x). use a sentinel controlled while loop. use the series definition of e^+-jx


Data is required to be fed into the program (input) and sent out of the program (output). Considering the draughtsman using a CAD station, the input is his commands to cause lines/