Like Tree3Likes
  • 1 Post By Matticus
  • 2 Post By Matticus

Powerless help

This is a discussion on Powerless help within the C Programming forums, part of the General Programming Boards category; Hi everyone, i am learning C, and i saw this in a exercise: powerless(1025) What is the result? and how ...

  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
    2,652
    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?
    rags_to_riches likes this.

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

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    2,652
    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;
    }
    christop and patta like this.

  5. #5
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,500
    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

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