Answered step by step
Verified Expert Solution
Link Copied!

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 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How many different perspectives are evident in this article?

Answered: 1 week ago

Question

6. Conclude with the same strength as in the introduction

Answered: 1 week ago

Question

7. Prepare an effective outline

Answered: 1 week ago