Thread: Powerless help

  1. #1
    Registered User
    Join Date
    Sep 2012
    Posts
    7

    Powerless help

    Hi everyone, i am learning C, and i saw this in a exercise:


    powerless(1025)


    What is the result?


    and how works the powerless?


    i think that powerless works with number 2 and powerless10 works with value 10 but i dont know how it really works... can anyone give me some help?Because i dont find nothing about that in the web.


    Thanks

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    4,222
    1. Welcome to the forums
    2. Please don't cross-post - it's considered bad manners
    3. I've never heard of a "powerless" function. Where did this exercise come from?

  3. #3
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,669
    How about showing us the code where you saw this?

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    4,222
    If this is a real question, I imagine that this is a custom function from within the exercise; i.e.

    Code:
    #include <stdio.h>
    
    int powerless(int argument);
    
    int main(void)
    {
        if(!powerless(1025))
            printf("We have no clue what you're talking about, so we're powerless to help.\n");
    
        return 0;
    }
    
    int powerless(int argument)
    {
        int clue = argument * 0;
    
        return clue;
    }

  5. #5
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,512
    Was the section in your book talking about inputs to functions?

    The powerless() subroutine/function is not a standard C feature.
    Fact - Beethoven wrote his first symphony in C

Popular pages Recent additions subscribe to a feed
Website Security Test