Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please answer all questions with explaination. There's only 1 correct answer for each question. Will give upvote. 1 . What happens if you take the
Please answer all questions with explaination. There's only correct answer for each question. Will give upvote.
What happens if you take the address of a pointer variable with the & operator?
A: It's already a memory address, so you get the same address again.
B: You get the memory address of that pointer variable; it has a memory address too.
C: Your program is likely to crash, since you're referencing memory that was allocated in a stack frame for a function that has already returned.
D: You're emulating passbyvalue.
Which of these things can you not have as a field in a struct?
A: A pointer to memory on the stack.
B: A function pointer.
C: A field that is a struct of the same type as the struct itself.
D: A floating point number, since floating point math is notoriously inexact.
Which of these are true of breadthfirst search?
A: Breadthfirst search keeps its set of previously visited nodes in a stack.
B: Breadthfirst search is guaranteed to have the shortest possible runtime in finding a path, if one exists.
C: Breadthfirst search only works on directed graphs; for an undirected graph, you have to use depthfirst search.
D: Breadthfirst search is guaranteed to find a shortest path in terms of total number of hops in your graph.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started