Output constant defined by #define - C Language Basics

C examples for Language Basics:printf

Description

Output constant defined by #define

Demo Code

#include <stdio.h>
#define SPEED 55//from w  ww.ja  v  a 2 s.  c o m
int main()
{
   printf("Now, the speed limit here is %i.\n",SPEED);
   printf("But I clocked you doin' %i.\n",SPEED+15);
   printf("Didn't you see that %i MPH sign?\n",SPEED);
   return(0);
}

Result


Related Tutorials