FidoNet Echomail Archive
aust_c_here

<<< Previous Index Next >>>

From: Frank Adam
To: All
Date: 1997-03-25 18:07:02
Subject: cprintf

Hi guys,
 
I can't figure this one out.

#include <conio.h>
#include <stdio.h>

char s[100];
       
main()
{
 int i =0;
 while(i < 5)
 {
  fgets(s,100,stdin);
  cprintf("%s\n\r",s);
  i++;
  }
 return 0;
 }

This will print the entered text three times, why does it do that ?  
Actually how does it do that ? I thought it would fill the registers with 
the location and length of the string and go int10, or 21 to print.
Turbo C v2 btw.


  Regards, Frank.
  
___ Blue Wave/DOS v2.21

--- Maximus 3.00
 * Origin: ZWSBBS +61-3-98276881 28800bps Multiline (3:634/396)
SEEN-BY: 633/267 270
@PATH: 634/396 639/252 632/360 50/99 635/728 633/267



<<< Previous Index Next >>>