help in filling the gaps..

This is a discussion on help in filling the gaps.. within the C Programming forums, part of the General Programming Boards category; i cant figure out what to write instead of ??2?? ...??5?? the function rotates to the right the letters on ...

  1. #1
    Banned
    Join Date
    Oct 2008
    Posts
    1,535

    help in filling the gaps..

    i cant figure out what to write instead of ??2?? ...??5??

    the function rotates to the right the letters on the odd places
    "num" times
    if num=3 then
    abcdef>>afcbed>>adcfeb>>abcdef

    i solved the first one
    i need hints regarding the others??

    Code:
    void rotateodd(char *str,int num){
        int len,last,i,j;
        char ch;
        len=strlen(str);
        if(len<4) return;
         num=??2??;
         if (num<0) num+=len/2;
        if (len%2)
              last=??3??;
       else
            last=??4??;
       for(i=0;i<num;i++){
          ch=str[last];
           for(j=last;j>1;??5??)
                  ??6??=??7??;
            ??8??=ch;
       }
    }
    Last edited by transgalactic2; 03-24-2009 at 04:50 PM.

  2. #2
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,832

  3. #3
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,047
    Quote Originally Posted by transgalactic2 View Post
    i can figure out what to write instead of ??2?? ...??5??
    What with the question marks, are they placeholders?

  4. #4
    Banned
    Join Date
    Oct 2008
    Posts
    1,535
    yes
    instead ??2?? i need to write some thing

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. subsets filling the gaps question..
    By transgalactic2 in forum C Programming
    Replies: 0
    Last Post: 07-06-2009, 04:51 AM
  2. double hashing not filling 100% of big tables
    By simpatico_qa in forum C Programming
    Replies: 10
    Last Post: 04-13-2009, 02:42 PM
  3. Help required in image filling program.
    By co123ol in forum C Programming
    Replies: 1
    Last Post: 03-04-2008, 01:42 PM
  4. filling an array of structures?
    By voodoo3182 in forum C Programming
    Replies: 9
    Last Post: 08-06-2005, 05:29 PM
  5. circle filling
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 06-08-2002, 05:37 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21