![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Why not a segmentation fault?? | lagigliaivan | High Level Programming | 22 | 05-21-2008 11:07 AM |
| segmentation fault | rockgal | High Level Programming | 8 | 12-05-2006 12:16 PM |
| segmentation fault | wojtyla | High Level Programming | 3 | 02-19-2005 02:53 PM |
| Segmentation fault | jshaulis | AIX | 1 | 06-01-2004 04:16 PM |
| segmentation fault | omran | High Level Programming | 2 | 08-01-2003 08:19 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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? |
|
||||
|
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]); The mistake.I was supposed to give "&a[i]" . thanks for your time pals. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|