Thread: Basic C function.. I dont understand

  1. #1
    Registered User
    Join Date
    Mar 2017
    Posts
    1

    Basic C function.. I dont understand

    I don't understand how it is equal to 120..
    Basic C function.. I dont understand-1-pngBasic C function.. I dont understand-2-png

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Next time, paste your code between [code][/code] tags. A fuzzy picture is no use to us if we want to compile/quote/edit your program.

    > for ( i = 1 ; i < x ; i++ )
    How many times does this loop?
    What are the values of i ?

    > x *= i;
    Do you know this is short for x = x * i; ?
    Do you know how many times x gets multiplied by something?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. need help dont understand
    By txfog in forum C++ Programming
    Replies: 6
    Last Post: 06-14-2013, 07:38 AM
  2. i dont understand bit
    By joker_tony in forum C Programming
    Replies: 2
    Last Post: 03-27-2008, 12:15 AM
  3. i dont understand this loop and function
    By joker_tony in forum C Programming
    Replies: 4
    Last Post: 03-20-2008, 11:36 PM
  4. Replies: 14
    Last Post: 03-18-2006, 09:14 AM
  5. dont understand VS.NET
    By Qui in forum Windows Programming
    Replies: 6
    Last Post: 10-15-2003, 07:36 PM

Tags for this Thread