Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Python Institute Exam PCAP-31-03 Topic 5 Question 76 Discussion

Actual exam question for Python Institute's PCAP-31-03 exam
Question #: 76
Topic #: 5
[All PCAP-31-03 Questions]

What is the expected out of the following code of the file named zero_length_existing_file is a zero-length file located inside the working directory?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Yong
2 months ago
I bet the answer is 'a partridge in a pear tree'. Or maybe 'the meaning of life, the universe, and everything'. Who knows, these coding questions can be so random sometimes!
upvoted 0 times
Stephane
12 days ago
Haha, coding questions can definitely be unpredictable!
upvoted 0 times
...
Magdalene
13 days ago
C) an errno value corresponding to file not found
upvoted 0 times
...
Chandra
1 months ago
A) 0
upvoted 0 times
...
...
Dorsey
2 months ago
D, definitely D! 2 is the answer, no doubt about it. Why? Because... well, just because!
upvoted 0 times
...
Ronny
2 months ago
Oh, I know this one! The correct answer has to be C, an errno value corresponding to file not found. That's gotta be it, right?
upvoted 0 times
Arlette
24 days ago
D) 2
upvoted 0 times
...
Veronica
1 months ago
C) an errno value corresponding to file not found
upvoted 0 times
...
Shaun
1 months ago
B) -1
upvoted 0 times
...
Rosendo
1 months ago
A) 0
upvoted 0 times
...
...
Melodie
2 months ago
Wait, is this a trick question? I'm not so sure about 0 anymore. Maybe -1 is the correct answer, since it's a zero-length file and all.
upvoted 0 times
Antonio
1 months ago
User 2: I'm not so sure about that. I believe the correct answer is B) -1.
upvoted 0 times
...
Glendora
1 months ago
User 1: I think the answer is A) 0.
upvoted 0 times
...
...
Carolann
2 months ago
But the question specifies that it's a zero-length file, so I still think it's A) 0.
upvoted 0 times
...
Mitsue
2 months ago
I disagree, I believe it should be B) -1 because the file is empty.
upvoted 0 times
...
Bettina
2 months ago
Hmm, interesting. The file is zero-length, so I'm guessing the answer is 0. That seems like the most logical choice.
upvoted 0 times
Latosha
20 days ago
User1: Let's go with 0 as the answer.
upvoted 0 times
...
Sarah
1 months ago
User3: It could also be an errno value for file not found.
upvoted 0 times
...
King
1 months ago
User2: I agree, a zero-length file should return 0.
upvoted 0 times
...
Wava
2 months ago
User1: I think the answer is 0.
upvoted 0 times
...
...
Carolann
3 months ago
I think the expected output is A) 0.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77