On Wed, Aug 31, 2011 at 11:29 PM, Jeffrey Walton <noloader@xxxxxxxxx> wrote: > > On Wed, Aug 31, 2011 at 6:53 AM, Avinash Sonawane > <avinash.sonawane1990@xxxxxxxxx> wrote: > > Respected Sir, > > I am using gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) > > I wrote one simple program but after compiling it, its showing me some > > unusual errors . > > Please help. > > > > Program: > > > > # include <stdio.h> > > # include <stdlib.h> > > > > int main() > > { > > int *p; > > int n,i; > > > > printf("No. Of Elements = "); > > scanf("%d",&n); > > > > p = (int *) malloc(n*sizeof(int)); > > > > for(i=0;i<n;i++) > > scanf("%d",(p+i)); > > > > for(i=0;i<n;i++) > > printf("%d\t",*(p+i)); > > > > printf("\n"); > > > > free(p); > > > > return 0; > > } > > > > Terminal: > > > > avinash@titanic:/Remastersys/Documents/Programs/c$ gcc dm.c -o dm > > dm.c: In function ‘main’: > > dm.c:17:1: error: stray ‘\302’ in program > > dm.c:17:1: error: stray ‘\240’ in program > You have copy/pasted code from the web. I ran across the same issue Sorry but I have not copied it from anywhere else and that's why I am more curious as how did that character get into my program. > when copy/paste from code.google.com in the past. > > You will see the miscreant characters in a hex editor. You will *not* > see them using gedit. And gedit does not properly search/replace - you > will need to use emacs, vi, etc. > Thanks for the guidance. For that matter I'll go for vi. > Jeff -- Avinash Sonawane PICT Pune India