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

Life, the Universe, and Everything

$
0
0

What is the probem with the following code, somebody please explain. May be I am missing some test case!

#include< stdio.h >
#include< stdlib.h >

int main()

{

int n,i=0,arr[] = {2,43,6,76,87,77,34,23,42,40,6,75,65};

    while (arr[i] || arr[i]==0)
    {
        if (arr[i] == 42)
            exit(0);
        printf("%d\n",arr[i]);
        i++;
    }
    return 0;
}

Viewing all articles
Browse latest Browse all 40121

Trending Articles



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