bobotlwane
December 13th, 2007, 06:13 PM
hey guys im having a problem with GCC please help
the compiler never goes to the bottom of the code, look at the code
it gives a fault, how can i solve this
>boikhutso@morobana:~$cat >ck.c<<p
> #include<stdio.h>
> int main(void)
> {
> int b;
> printf("please enter number:\n");
> scanf("%d,&b");
> printf("boikhutso %d",b);
> return 0;
> }
> p
boikhutso@morobana:~$ gcc ck.c -o ck
boikhutso@morobana:~$ ./ck
please enter number:
12
Segmentation fault (core dumped)
the compiler never goes to the bottom of the code, look at the code
it gives a fault, how can i solve this
>boikhutso@morobana:~$cat >ck.c<<p
> #include<stdio.h>
> int main(void)
> {
> int b;
> printf("please enter number:\n");
> scanf("%d,&b");
> printf("boikhutso %d",b);
> return 0;
> }
> p
boikhutso@morobana:~$ gcc ck.c -o ck
boikhutso@morobana:~$ ./ck
please enter number:
12
Segmentation fault (core dumped)