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
Relationship between an Array and Pointers. Consider the following. int arr[] = {0,1,2,3,4,5,6,7,8,9}; If we write arr , it is considered as the address of the first elem

Sorted directory - C++ program: Write a program in c to sorting a directory. int main( int argc, char *argv[] ) {     if( argc 3 )         {         cerr

finds the average for all assignments for an individual student float getAverageForStudent(float scores[20][10], int student, int numAssignments) {  }  // finds the average for

There are 3 acceptable answers: "Never," "Rarely "and" When the problem domain cannot be accurately modelled any other way."

hello i have about 15 hours the dead line I Need a program in c language that''s determine the router ip or the gateway ip of the current NIC example the router ip is: 192.168.1.1


WAP TO PRINT NUMBERS FROM 1-50 WHICH ARE DIVIDED BY 7 void main () { int a; clrscr (); a=1; while (a { if (a%7==0) printf ("%d\n",a); a++; } ge

Nested Classes Many a times, it becomes essential to have a class contain properties of two other classes. One way is to explain a class within another - that is a class with m


At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers