Strings
Thanks. Now I got a clear idea of this code.
:)
User Profile
Collapse
-
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;...Leave a comment:
-
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,Leave a comment:
-
strings
if (line[strlen(line)-1]=='\n')
{
line[strlen(line)-1]='\0';
}
If anyone expalin how this code works? why 1 is deducted ?
thanks
No activity results to display
Show More
Leave a comment: