![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Why not a segmentation fault?? | lagigliaivan | High Level Programming | 22 | 05-21-2008 08:07 AM |
| segmentation fault | rockgal | High Level Programming | 8 | 12-05-2006 08:16 AM |
| segmentation fault | wojtyla | High Level Programming | 3 | 02-19-2005 10:53 AM |
| Segmentation fault | jshaulis | AIX | 1 | 06-01-2004 01:16 PM |
| segmentation fault | omran | High Level Programming | 2 | 08-01-2003 05:19 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Segmentation Fault
hello all,
I tried a program on an array to intialise array elements from the standard input device.it is an integer array of 5 elements.but after entering the 4th element it throws a message called "Segmentation Fault" and returns to the command prompt without asking for the 5th element. why is it so? |
| Forum Sponsor | ||
|
|
|
|||
|
sorry guys Petty mistake
thanks for your time guys.
I had done a petty mistake in scanf.I tried to accept the input like this for(i=0;i<5;i++) scanf("%d", a[i]); I was supposed to give "&a[i]" . thanks for your time pals. |
|||
| Google The UNIX and Linux Forums |