Search code examples
ccompiler-errorsdefinition

Defining function and printing in c


I am trying to define predefined function and it is giving me error... what is wrong with below prog. somebody told me that I can define predefined function. I know this is not correct but still I am posting... if somebody have .....

#include <stdio.h>
#include <stdlib.h>
#define scanf "%s abc";

int main()
 {
  printf(scanf,scanf); 
   return 0;
  }

Solution

  • you should delete the semicolon in the line #define