String routines in c, C/C++ Programming

Available in the string.h header file are the following routines  
   
  strcat(string1,string2);
 
This joins string2 to string1; care must be taken to allocate enough space for the answer 
 
  strchr(string,character);
 
This locates the position of the first occurrence of the character within the string and returns the address of that character i.e. a Find 
 
  strcmp(string1,string2);
 
This compares string2 to string1, if no difference if found a NULL character is returned else the address of the first non matching character.
 
  strcpy(string1,string2);
 
The copies the string2 into string1
 
  strlen(string);
 
Returns the length of the string 
 
  isalpha(character);
 
Returns a non-zero number if the character is a letter, otherwise a zero is returned
 
  isupper(character);
 
Returns a non-zero number if the character is uppercase, otherwise a zero is returned
 
  islower(character);
 
Returns a non-zero number if the character is lower case, otherwise a zero is returned
 
  isdigit(character);
 
Returns a non-zero number if the character is a digit i.e. 0-9, otherwise a zero is returned
 
  toupper(character);
 
Returns the upper case version of the character 
 
  tolower (character);
 
Returns the lower case version of the character

Posted Date: 4/16/2013 12:48:25 AM | Location : United States







Related Discussions:- String routines in c, Assignment Help, Ask Question on String routines in c, Get Answer, Expert's Help, String routines in c Discussions

Write discussion on String routines in c
Your posts are moderated
Related Questions
Algorithm for railway ticket booking process

The code contains two built-in pitfalls. First one, if it executes in a member function for an static, extern or automatic object, the program will possibly crash as soon as the de

The heart of the modern electronic system is the microprocessor e.g. the video, sound, game consoles, portable phones and domestic appliances. Let us consider the heart of a home c

what would be the best tool for debuggingg memory leaks in c/c++ programming

Write a C# program to compute the Net Pay for employees. The program is to have a Main method and two user-defined methods. The Main method is to input the employee's name (string)


aj is a newbie to the programming and while learning the programming language he came to know the following rules: - Each program must start with ''{'' and end with ''}''.

write a c progrm to find area under the cuve y=f(x)   #include float start_point, /* GLOBAL VARIABLES */ end_point, total_area; in

Using Figure 10.2 as a model, illustrate the result of each operation in the sequence ENQUEUE.Q; 4/, ENQUEUE.Q; 1/, ENQUEUE.Q; 3/, DEQUEUE.Q/, ENQUEUE.Q; 8/, and DEQUEUE.Q/ on an i

Explain about the Floating point Constants in c language? A floating point constant is the number that contains either a fraction or decimal part. If an exponent is present its