Puzzle E17

Precedence of Arithmetic Operators

What is displayed by this program?

#include <stdio.h>

/* Puzzle E17 -- precedence of arithmetic operators */
int main()
{
  int a = 1, b = 2 ;
  double result;
  
  result = a/b + a/b;
  
  printf("result: %f\n", result );   
  return 0;
}


Previous Page        Answer         Next Page         Home