What is wrong here? I can not see the error.
#include <stdio.h>
void Main(void)
{
int a = 9;
int b = 3;
int c = 0;
int *p = &b;
c = a/*p;
printf("%d \n", c);
}
What is wrong here? I can not see the error.
#include <stdio.h>
void Main(void)
{
int a = 9;
int b = 3;
int c = 0;
int *p = &b;
c = a/*p;
printf("%d \n", c);
}
There are three errors:
main
and not Main
. int
and not void
. Some compilers accept this form but this does not mean that it is correct to use in standard C. /*
is a start of comment. You need to ensure that it is unambiguous using parentheses. Correct code:
#include <stdio.h>
int main(void) {
int a = 9;
int b = 3;
int *p = &b;
int c = a / (*p);
printf("%d \n", c);
}
See running on ideone . And no Coding Ground . Also put it in GitHub for future reference .