Which of the following statements are true? (Select two answers)
Suggested Answer: A, 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
35 comments · newest first
AL
Alysa
12 months ago
I disagree with D, it usually returns -1 on failure.
TA
Tamar
1 year ago
Wait, D says None is returned? That seems off.
MA
Mabel
1 year ago
C sounds right, those are standard streams.
LI
Lindsey
1 year ago
I think B is also true, the second argument can be optional.
ED
Edwin
1 year ago
A is definitely true, it returns a file handle.
CE
Cecil
1 year ago
For option D, I thought open() would raise an error if it fails instead of returning None, so I'm not sure about that one.
PO
Portia
1 year ago
I feel like I've seen instd, outstd, and errstd mentioned before, but I can't recall if they are actually the names of pre-opened streams.
RU
Rusty
1 year ago
I remember practicing a question where the second argument of open() was optional, so I think B is definitely true.
AD
Adelaide
1 year ago
I think option A is true because open() does return a file handle, but I'm not completely sure about the type being int.
AR
Arminda
1 year ago
Alright, time to put my knowledge to the test. I'm feeling good about options A and B, but I'll need to carefully consider the other choices as well. Gotta make sure I get this right.
BE
Beula
1 year ago
I'm a bit confused by this question. I know the basics of the open() function, but I'm not sure I can confidently select two correct answers. I'll need to review my notes before deciding.
HE
Helene
1 year ago
I got this! Option A is definitely true, and I think option C is also correct. The other two are a bit more uncertain, but I'll give it my best shot.
KA
Kandis
1 year ago
Okay, let's see here. I'm pretty sure option A is true, but I'm not as confident about the others. I'll need to double-check the details.
VA
Vallie
1 year ago
Hmm, this looks like a tricky one. I'll need to carefully review the options and think through what I know about the open() function.
RI
Rikki
1 year ago
This looks like a tricky question on credit shelter trusts. I'll need to carefully read through the options and think about which ones are correct.
MI
Micah
1 year ago
Hmm, I'm a bit unsure about this one. The question is asking about the "next generation" of inspection approaches, so I'll need to think carefully about which of these options best fits that description.
BE
Bettina
2 years ago
A, C, and D all sound plausible to me. I'm going to go with those three just to be safe.
BI
Billye
2 years ago
Haha, open() returning None? That's the equivalent of your car's owner's manual being blank. Not very useful!
GL
Glory
2 years ago
D definitely can't be right. What kind of programmer would return None for a failed file open? That's just silly.
GO
Golda
2 years ago
Definitely, it would be more useful to return an error code or something.
DE
Delmy
2 years ago
Yeah, it seems like a bad design choice.
PA
Paris
2 years ago
I agree, returning None for a failed file open doesn't make sense.
VE
Veronika
2 years ago
Yeah, those sound more logical. Good choices.
AL
Alecia
2 years ago
I think the correct statements are B) the second open () argument is optional and C) instd, outstd, errstd are the names of pre-opened streams.
NO
Noel
2 years ago
I agree, returning None for a failed file open doesn't make sense.
HY
Hyman
2 years ago
I'm pretty sure B is also true. The second argument to open() is the file mode, which can be specified optionally.
CA
Carman
2 years ago
Yes, you're right. B is also true. The second argument is optional for open().
CA
Carman
2 years ago
I think A and B are correct. The second argument is indeed optional.
RE
Reid
2 years ago
You're right, I misunderstood. A and C make more sense now.
DO
Dorothy
2 years ago
But the second argument in open() is not optional, it is mandatory.
RE
Reid
2 years ago
I think B and D are the correct answers.
DO
Dorothy
2 years ago
A and C are true.
WI
Wilson
2 years ago
A and C seem correct to me. The open() function returns a file descriptor, not None.
BE
Benton
2 years ago
The open() function returns a file descriptor, not None.
KA
Katie
2 years ago
A and C seem correct to me.