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 PCAP-31-03 Exam - Topic 5 Question 7 Discussion

Posted by Venita on May 10, 2022 at 12:36 AM

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?

Suggested Answer: B

Get Premium PCAP-31-03 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
11 comments · newest first
TE
Tequila 1 year ago
Nah, I doubt it returns an errno for file not found, that's option C.
TI
Timothy 1 year ago
I think it might return -1 if there's an issue opening it.
AN
Anabel 1 year ago
Wait, what if the file is empty? Does that change anything?
GR
Gregoria 1 year ago
Totally agree, option A is the right choice!
KA
Kaitlyn 1 year ago
It should return 0 since the file exists.
KA
Kathryn 1 year ago
I feel like the errno value might come into play if the file didn't exist, but since it does exist, that shouldn't be the case here.
KA
Katie 1 year ago
I remember a practice question where reading an empty file returned -1, but that was in a different context.
HO
Howard 1 year ago
I think the code should return 0 since it's reading a zero-length file, but I'm not entirely sure.
EL
Elroy 1 year ago
I’m leaning towards option D, but I can't recall if reading a zero-length file would actually give a value like 2.
DI
Dianne 1 year ago
Wait, what's the difference between a registration handler and just-in-time provisioning? I'm not sure which one of those requirements I should focus on.
RO
Rolande 1 year ago
Okay, let's break this down. We have a multi-cloud Salesforce implementation with B2C Commerce, Service Cloud, and Marketing Cloud. The key is understanding how to best leverage the different environments for testing and deployment.
0/2000 characters

Save Cancel