Question: 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 1 correct answer for each question. Will give upvote.
1. 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 pass-by-value.
2.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.
3. Which of these are true of breadth-first search?
A: Breadth-first search keeps its set of previously visited nodes in a stack.
B: Breadth-first search is guaranteed to have the shortest possible run-time in finding a path, if one exists.
C: Breadth-first search only works on directed graphs; for an undirected graph, you have to use depth-first search.
D: Breadth-first 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!