Search:

Type: Posts; User: Sylar Persie

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,144

    Okay..is there any way to override that and keep...

    Okay..is there any way to override that and keep the loop running until a char input 'n' is entered?
  2. Replies
    5
    Views
    1,144

    getchar() help

    In the following code snippet



    while(1)
    {
    char c;
    printf("enter y/n");
    c=getchar();
    if(c=='y')
  3. Replies
    7
    Views
    1,611

    Im sorry.I think I explained poorly.It returns 1...

    Im sorry.I think I explained poorly.It returns 1 if one of the strings is a substring of the other.And,it is not an implementation of the substr function.
  4. Replies
    7
    Views
    1,611

    Substring in linear time

    Hi! Is the complexity of this function linear? If not,what is the complexity?Also,does this work for all test cases?Any suggestions would be helpful.Thanks!

    It returns 1 if a match is found and 0...
  5. Replies
    5
    Views
    962

    Thanks laserlight...that's what i wanted to...

    Thanks laserlight...that's what i wanted to know:)
  6. Replies
    5
    Views
    962

    Ok...now,if i want to pass this char array to a...

    Ok...now,if i want to pass this char array to a function whose prototype is like


    char *fn(char *c)



    how can i pass this char array and return another char array back to main?
  7. Replies
    5
    Views
    962

    Doubt in swapping

    Why is this swapping wrong?


    #include<stdio.h>


    int main(void)
    {
    char *c="abcdefgh";
    char d;
  8. Replies
    4
    Views
    853

    That's what i wanted to know..thanks a million...

    That's what i wanted to know..thanks a million dude:)
  9. Replies
    4
    Views
    853

    I don't know...i just copied the code from the...

    I don't know...i just copied the code from the following website


    C String Substring

    Dont understand how it works:(
  10. Replies
    4
    Views
    853

    Doubt in Substring

    #include<stdio.h>


    int main(void)
    {
    char str[]="abcd";
    int i=1,j=4;
    char *ch=str;
    printf("%.*s\n",j-i,&ch[i]);
  11. Replies
    10
    Views
    4,027

    That's what i wanted to know..Thanks a lot guys:)

    That's what i wanted to know..Thanks a lot guys:)
  12. Replies
    10
    Views
    4,027

    I presume it is a keyword,globally used only by...

    I presume it is a keyword,globally used only by the compiler:)
  13. Replies
    10
    Views
    4,027

    Is it a reserved identifier?

    Is it a reserved identifier?
  14. Replies
    10
    Views
    4,027

    size_t in source code of strlen

    Hi! I read the source code of strlen() function in a book called "The Standard C Library" and it is as follows:


    /* strlen function */
    #include <string.h>
    size_t (strlen)(const char *s)
    {...
  15. Replies
    1
    Views
    1,037

    Integer pointer to a 2-D array

    What is wrong with the assignment p=a in this code?


    #include<stdio.h>


    int main(void)
    {
    int a[][4]={5,7,5,0,
    4,6,3,1,
  16. Replies
    4
    Views
    1,217

    Thanks hk_mp5kpdw....that made things clear:)

    Thanks hk_mp5kpdw....that made things clear:)
  17. Replies
    4
    Views
    1,217

    I'm sorry,what does that mean?Could you elaborate?

    I'm sorry,what does that mean?Could you elaborate?
  18. Replies
    4
    Views
    1,217

    Void pointer

    What is a void pointer?Consider the following code snippet


    #include<stdio.h>
    void main()
    {
    float i=10,*j;
    void *k;
    k=&i;
    ...
  19. Thanks oogabooga...seems like this code might be...

    Thanks oogabooga...seems like this code might be the one he asked for:)
  20. Yes..he said that we are not supposed to use them.

    Yes..he said that we are not supposed to use them.
  21. I thought of it first too,but he said that i must...

    I thought of it first too,but he said that i must print it all within this single function int fib(int n) recursively.Nothing extra.
  22. Thanks laserlight:).... that really helped:)

    Thanks laserlight:).... that really helped:)
  23. Yes, I have.But I can't understand the idea of...

    Yes, I have.But I can't understand the idea of "using recursion to loop over array elements".What exactly is that?
  24. I'm sorry,but im fairly new to programming in...

    I'm sorry,but im fairly new to programming in c.What do you mean by looping over the array elements?Could you explain with an example,if it's ok?
  25. Print fiibonacci series using recursion(print in recursive function,do not use loops)

    I am required to print the fibonacci series using a recursive function
    int fib(int n) where n is the number of elements in the series.I pass this through main.And i am not allowed to use any loops...
Results 1 to 25 of 25