Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

runtime error

$
0
0

How to resolve the segmentation fault runtime error? I am getting it again and again despite making changes to my code. This in reference to the last question of the practice problems. link:http://www.codechef.com/problems/easy

My code is as follows: int main() { int i=0; int a[10];

for(i=0;i<10;i++) scanf("%d",a[i]);

for(i=0;i<10;i++) { while(a[i]!=42) { printf("%d",a[i]); printf("\n");}} return 0; }


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>