User Profile

Collapse

Profile Sidebar

Collapse
smartset
smartset
Last Activity: Dec 11 '09, 05:43 AM
Joined: Nov 14 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • smartset
    replied to strings
    in C
    Strings

    Thanks. Now I got a clear idea of this code.
    :)
    See more | Go to post

    Leave a comment:


  • smartset
    replied to strings
    in C
    In the following program what is the purpose of defininig these two lines code?

    if (line[strlen(line)-1]=='\n')
    {
    line[strlen(line)-1]='\0';
    }


    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    int main(int numParms, char *parms[])
    {
    const int LINE_SIZE = 1000;
    const int STRING_SIZE = 100;
    const int NUM_STRINGS = 100;...
    See more | Go to post

    Leave a comment:


  • smartset
    replied to strings
    in C
    Strings

    Hello Mark,

    Thanks for replly. But still confused as I'm not getting but will happen if we pass "Hello" as a strings and if we pass "Hello World" in an array of arr[10].

    Thanks,
    See more | Go to post

    Leave a comment:


  • smartset
    started a topic strings
    in C

    strings

    if (line[strlen(line)-1]=='\n')
    {
    line[strlen(line)-1]='\0';
    }

    If anyone expalin how this code works? why 1 is deducted ?

    thanks
    See more | Go to post
No activity results to display
Show More
Working...