top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

If errno contains a nonzero number, is there an error?

+3 votes
79 views
If errno contains a nonzero number, is there an error?
posted Jan 22, 2015 by Merry

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

Yes.
As per the manual page of errno i.e man 3 errno

Valid error numbers are all nonzero; errno is never set to zero by  any
system call or library function.

For more info regrading different types of errno please have a look on man page of errno.

answer Jan 23, 2015 by Arshad Khan
Similar Questions
+3 votes

A list contains a set of numbers, one number presents once and other numbers present even no. of times. Find out the number that occurs once in the list.

+3 votes

I want to count the number of bytes in a stream that contains nulls. I know I can't use strlen() for this, is there an alternative?

char *stream = "\x11\x12\x13\x00\x12\x13\x14\x15";
+1 vote

For example

Input : Binary Tree

               A
             /    \ 
           B        E
         /   \       \    
        C     D       B     
                     /  \    
                    C    D

Output : Yes

...