Chapter 7 Programming

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

The unary * and __________ are complements of one another.

&

Assuming that t is an array and tPtr is a pointer to that array, what expression refers to the address of element 3?

&t[3]

Three of the following expressions have the same value. Which of the following's value is different from the others?

*Ptr

Which of the following can have a pointer as an operand?

++

Given that k is an integer array starting at location 2000, kPtr is a pointer to k, and each integer is stored in 4 bytes of memory, what location does kPtr + 3 point to?

2012

What method should be used to pass an array to a function that does not modify the array and only looks at it using array subscript notation?

A constant pointer to constant data.

Which of the following statements is false?

A key feature of functions like printf_s and scanf_s that makes them more secure is that they have runtime pointer constraints that are checked after attempting to use the pointers.

Which statement about the algorithm we presented in Section 7.10 of the text for shuffling a deck of cards is true?

It could execute indefinitely

Which statement is false?

Structures are always passed call by reference.

Which statement is false?

The address operator can be applied to variables defined with the storage class register.

Which statement about pointers is false?

The indirection operator * distributes to all comma-separated variable names in a definition.

Which statement is false?

When applied to the name of an array, sizeof returns the number of elements in the array.

(*max)(num1, num2, num3);

is a call to function max

The definition int *count;

is a correct definition of integer pointer count.

A function that prints a string should have a parameter that's a

nonconstant pointer to constant data.

Pointers cannot be used to

reference values directly.

When a structure must be passed to a function, we can use pointers to constant data to get the performance of a call by __________ and the protection of a call by __________.

reference, value

An algorithm that could execute for an unknown amount of time because it depends on random numbers to exit a function may

suffer from indefinite postponement.

A pointer to a function contains __________.

the address of the function in memory

The & operator can be applied to

variables defined with the storage class static


Ensembles d'études connexes

Econ 102 Exam 2 Chapter 6, 8, and 9

View Set

073 - Chapter 73 - Fiscal & Monetary Policies in Economics

View Set

Business Intel and Analytics - Chapter 3

View Set

Econ 135 Final (ch14 and past exam)

View Set