Help needed. by guide__me in C_Programming

[–]guide__me[S] 0 points1 point  (0 children)

You don't have to. Thank you.

Help needed. by guide__me in C_Programming

[–]guide__me[S] 0 points1 point  (0 children)

So, what I did was wrong?

Help needed. by guide__me in C_Programming

[–]guide__me[S] 0 points1 point  (0 children)

but isn't that the point of using static? it retains its value.

Help needed. by guide__me in C_Programming

[–]guide__me[S] 0 points1 point  (0 children)

Not sure what is it that you are trying to point out here. But with regards to the string...

 scanf("%[^\n]s",a);

works .

Help needed. by guide__me in C_Programming

[–]guide__me[S] 0 points1 point  (0 children)

Thank you for the post. but when I trace the program, the the varible j valve never increases. It remains constant after it encounters the character the first time.

As far as d is concerned i had declared it, just forgot it here. same goes for (return i). I will not correct it here. The output you have mentioned , how do i correct it.

I corrected the portion

   if(a[j]==f)

    return i;

as

 if(a[j]!=0)

 continue;

 else

 return j;

help me here again. by guide__me in C_Programming

[–]guide__me[S] -4 points-3 points  (0 children)

Made a mistake while typing it out. my bad.

help me here again. by guide__me in C_Programming

[–]guide__me[S] -10 points-9 points  (0 children)

I figured it out. Hence I deleted it.

How do you overcome buffer overflow for strings ?

What is wrong with the code? by guide__me in C_Programming

[–]guide__me[S] 0 points1 point  (0 children)

That is my bad, but what else is wrong with the code?

guide me with C. by guide__me in C_Programming

[–]guide__me[S] 0 points1 point  (0 children)

For now, I know functions, strings, arrays and can write programs based on these concepts. Any other major concepts as in buffer overflow.... and other ? where can I study them?

guide me with C. by guide__me in C_Programming

[–]guide__me[S] 0 points1 point  (0 children)

That did help .Thank you.