Results 1 to 4 of 4

Thread: String manipulation in c

  1. #1
    Join Date
    Feb 2006
    Posts
    185

    String manipulation in c

    I start learning C mode, I already read the tutorial but i was unable to find out the use of strcpy function. Can any one explain me C String Manipulation.Any help will be extremely appreciated.

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: String manipulation in c

    The C programming language offers a library function called strcpy, defined in the string.h header file, that allows null-terminated memory blocks to be copied from one location to another.String manipulation is very useful and very widely used in every language. The strcpy() function shall return s1; no return value is reserved to indicate an error.

  3. #3
    Join Date
    Jan 2009
    Posts
    199

    Re: String manipulation in c

    The function strlen() will tell you the number of characters in a string. use a for loop to print out a string the user enters with a * between each letter. String objects are a special type of container, specifically designed to operate with sequences of characters. StrCpy Function, Copies one string to another.

  4. #4
    Join Date
    Dec 2008
    Posts
    177

    Re: String manipulation in c

    Code:
    #include <stdio.h>
    #include <string.h>
    
    int main() {
    
         
            char dem[] = "H Word";
            char * he_it_is;  
            dem[5] = '\0';
    
            printf ("%s\n",dem); 
            printf ("%d\n",strlen(dem));
    
            here_it_is = &dem[1];
            printf ("%s\n",he_it_is);
    
            }

Similar Threads

  1. Content Manipulation of MS Office with XML files
    By N I C K in forum Windows Software
    Replies: 4
    Last Post: 26-03-2010, 06:39 AM
  2. Manipulation between two dates
    By Ash maker in forum Software Development
    Replies: 5
    Last Post: 16-02-2010, 02:31 AM
  3. Visits counter manipulation with KompoZer
    By Leiff in forum Software Development
    Replies: 4
    Last Post: 18-01-2010, 05:39 PM
  4. passwd: authentication token manipulation error
    By Knopper in forum Operating Systems
    Replies: 3
    Last Post: 29-07-2009, 11:16 PM
  5. Make lifts manipulation in Windows
    By Jackie in forum Customize Desktop
    Replies: 0
    Last Post: 10-12-2008, 01:21 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,239,705.54019 seconds with 17 queries