Puzzle E11

Variables

Of course, expressions can contain variables. With arithmetic expressions, the type of the variable determines what type of operations are performed.

What is displayed by this program:

#include <stdio.h>

/* Puzzle E11 -- variables */
int main()
{
  int a = 7;
  int d = 3;
  
  printf("Expressions evaluate to: %d and to %f\n", a/d,  a/3.0 );   
  return 0;
}


Previous Page        Answer         Next Page         Home