• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
c question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

c question


  • Subject: c question
  • From: Michael <email@hidden>
  • Date: Wed, 29 Mar 2006 16:05:34 -0800

In my quest to start at the basics, could someone tell me why this code, in C, will not give the number of characters in the run log. tks

>>>>>>>


#include <stdio.h>

/* counts characters from key board */

int main () {

double i;

for ( i=0; getchar() != EOF; ++i)

;

printf("Number of characters = %.0f\n" , i);

    return 0;
}

<<<<<<<<<<<
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: c question
      • From: William Bumgarner <email@hidden>
    • Re: c question
      • From: "Justin C. Walker" <email@hidden>
  • Prev by Date: XCode & ADC Membership
  • Next by Date: Re: c question
  • Previous by thread: Re: XCode & ADC Membership
  • Next by thread: Re: c question
  • Index(es):
    • Date
    • Thread