CTC++ Coverage Report - Execution Profile    #2/3

Files Summary | Functions Summary | Execution Profile | Index | No Index
First | Previous | Next | Last


File: io.c
Instrumentation mode: function-decision-multicondition
TER: 80 % ( 4/ 5)

Start/ End/    
True False - Line Source

  1 /* File io.c ------------------------------------------------- */
  2 #include <stdio.h>
  3 
  4 /* Prompt for an unsigend int value and return it */
 
10   5 unsigned io_ask()
  6 {
  7     unsigned    val;
  8     int         amount;
  9 
  10     printf("Enter a number (0 for stop program): ");
10 - 11     if ((amount = scanf("%u", &val)) <= 0) {
  12         val = 0;    /* on 'non sense' input force 0 */
  13     }
10    14     return val;
  15 }    
  16 
  17 /* Display an unsigned int value and associated string */
 
  18 void io_report(unsigned val, char* str)
  19 {
  20     printf("%u %s\n\n", val, str);
  21 }
***TER 80% (4/5) of SOURCE FILE io.c

Files Summary | Functions Summary | Execution Profile | Index | No Index
First | Previous | Next | Last | Top