One line comments : Comments « Language Basics « C / ANSI-C






One line comments


#include <stdio.h>
#include <stdlib.h>

int avg(int a,int b) {
  return (a + b)/2;
}

int main() {
    int i, j;
    int answer;
   
   /* comments are done like this */
   
   i = 7;
   j = 9;

   answer = avg(i,j);
   printf("The mean of %d and %d = %d\n", i, j, answer);
   
   exit (0);
}



           
       








Related examples in the same category

1.Comments in C