Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

CSCI 2010 Midterm Ch 9, 11, 13 Exam Questions And Answers

Beoordeling
-
Verkocht
-
Pagina's
18
Cijfer
A+
Geüpload op
21-03-2026
Geschreven in
2025/2026

CSCI 2010 Midterm Ch 9, 11, 13 Exam Questions And Answers /. The _________ , also known as the address operator, returns the memory address of a variable. a. asterisk ( * ) b. ampersand ( & ) c. percent sign (%) d. exclamation point ( ! ) e. None of these - Answer-B /.With pointer variables, you can __________ manipulate data stored in other variables. a. never b. seldom c. indirectly d. All of these e. None of these - Answer-C /.The statement int *ptr; has the same meaning as a. int ptr; b. *int ptr; c. int ptr*; d. int* ptr; e. None of these - Answer-D /.When you work with a dereferenced pointer, you are actually working with: a. a variable whose memory has been deallocated b. a copy of the value pointed to by the pointer variable c. the actual value of the variable whose address is stored in the pointer variable d. All of these e. None of these - Answer-C /.These can be used as pointers. a. Array names b. Numeric constants c. Punctuation marks d. All of these e. None of these - Answer-A /.The contents of pointer variables may be changed with mathematical statements that perform: a. all mathematical operations that are legal in C++ b. multiplication and division c. addition and subtraction d. b and c e. None of these - Answer-C /.A pointer may be initialized with a. the address of an existing object b. the value of an integer variable c. the value of a floating point variable d. all of these e. None of these - Answer-A /.What does the following statement do? double *num2; a. Declares a double variable named num2. b. Declares and initializes an pointer variable named num2. c. Initializes a variable named *num2. d. Declares a pointer variable named num2. e. None of these - Answer-D /.When the less than ( ) operator is used between two pointer variables, the expression is testing whether a. the value pointed to by the first is less than the value pointed to by the second b. the value pointed to by the first is greater than the value pointed to by the second c. the address of the first variable comes before the address of the second variable in the computer's memory d. the first variable was declared before the second variable e. None of these - Answer-C /.Look at the following statement This statement... sum += *array++; a. is illegal in C++ b. will always result in a compiler error c. assigns the dereferenced pointer's value, then increments the pointer's address d. increments the dereferenced pointer's value by one, then assigns that value e. None of these - Answer-C /.Use the delete operator only on pointers that were a. never used b. not correctly initialized c. created with the new operator d. dereferenced inappropriately e. None of these - Answer-C /.A function may return a pointer, but the programmer must ensure that the pointer a. still points to a valid object after the function ends b. has not been assigned an address c. was received as a parameter by the function d. has not previously been returned by another function e. None of these - Answer-A /.Which of the following statements is not valid C++ code? a. int ptr = &num1; b. int ptr = int *num1; c. float num1 = &ptr2; d. All of these are valid e. All of these are invalid - Answer-E /.Which of the following statements deletes memory that has been dynamically allocated for an array? a. int array = delete memory; b. int delete[ ]; c. delete [] array; d. new array = delete; e. None of these - Answer-C /.When this is placed in front of a variable name, it returns the address of that variable. a. asterisk ( * ) b. conditional operator c. ampersand ( & ) d. semicolon ( ; ) e. None of these - Answer-C /.What will the following statement output? cout &num1; a. The value stored in the variable called num1. b. The memory address of the variable called num1. c. The number 1. d. The string "&num1". e. None of these - Answer-B /.A pointer variable is designed to store a. any legal C++ value b. only floating-point values. c. a memory address. d. an integer. e. None of these - Answer-C /.Look at the following *ptr; In this statement, what does the word int mean?

Meer zien Lees minder
Instelling
CSCI 2010
Vak
CSCI 2010

Voorbeeld van de inhoud

CSCI 2010 Midterm Ch 9, 11, 13 Exam
Questions And Answers

/. The _________ , also known as the address operator, returns the memory address of
a variable.
a. asterisk ( * )
b. ampersand ( & )
c. percent sign (%)
d. exclamation point ( ! )
e. None of these - Answer-B

/.With pointer variables, you can __________ manipulate data stored in other variables.
a. never
b. seldom
c. indirectly
d. All of these
e. None of these - Answer-C

/.The statement int *ptr;
has the same meaning as
a. int ptr;
b. *int ptr;
c. int ptr*;
d. int* ptr;
e. None of these - Answer-D

/.When you work with a dereferenced pointer, you are actually working with:
a. a variable whose memory has been deallocated
b. a copy of the value pointed to by the pointer variable
c. the actual value of the variable whose address is stored in the pointer variable
d. All of these
e. None of these - Answer-C

/.These can be used as pointers.
a. Array names
b. Numeric constants
c. Punctuation marks
d. All of these
e. None of these - Answer-A

/.The contents of pointer variables may be changed with mathematical statements that
perform:

,a. all mathematical operations that are legal in C++
b. multiplication and division
c. addition and subtraction
d. b and c
e. None of these - Answer-C

/.A pointer may be initialized with
a. the address of an existing object
b. the value of an integer variable
c. the value of a floating point variable
d. all of these
e. None of these - Answer-A

/.What does the following statement do?
double *num2;
a. Declares a double variable named num2.
b. Declares and initializes an pointer variable named num2.
c. Initializes a variable named *num2.
d. Declares a pointer variable named num2.
e. None of these - Answer-D

/.When the less than ( < ) operator is used between two pointer variables, the
expression is testing whether
a. the value pointed to by the first is less than the value pointed to by the second
b. the value pointed to by the first is greater than the value pointed to by the second
c. the address of the first variable comes before the address of the second variable in
the computer's memory
d. the first variable was declared before the second variable
e. None of these - Answer-C

/.Look at the following statement
This statement...
sum += *array++;
a. is illegal in C++
b. will always result in a compiler error
c. assigns the dereferenced pointer's value, then increments the pointer's address
d. increments the dereferenced pointer's value by one, then assigns that value
e. None of these - Answer-C

/.Use the delete operator only on pointers that were
a. never used
b. not correctly initialized
c. created with the new operator
d. dereferenced inappropriately
e. None of these - Answer-C

, /.A function may return a pointer, but the programmer must ensure that the pointer
a. still points to a valid object after the function ends
b. has not been assigned an address
c. was received as a parameter by the function
d. has not previously been returned by another function
e. None of these - Answer-A

/.Which of the following statements is not valid C++ code?
a. int ptr = &num1;
b. int ptr = int *num1;
c. float num1 = &ptr2;
d. All of these are valid
e. All of these are invalid - Answer-E

/.Which of the following statements deletes memory that has been dynamically allocated
for an array?
a. int array = delete memory;
b. int delete[ ];
c. delete [] array;
d. new array = delete;
e. None of these - Answer-C

/.When this is placed in front of a variable name, it returns the address of that variable.
a. asterisk ( * )
b. conditional operator
c. ampersand ( & )
d. semicolon ( ; )
e. None of these - Answer-C

/.What will the following statement output?
cout << &num1;
a. The value stored in the variable called num1.
b. The memory address of the variable called num1.
c. The number 1.
d. The string "&num1".
e. None of these - Answer-B

/.A pointer variable is designed to store
a. any legal C++ value
b. only floating-point values.
c. a memory address.
d. an integer.
e. None of these - Answer-C

/.Look at the following statement.int *ptr;
In this statement, what does the word int mean?

Geschreven voor

Instelling
CSCI 2010
Vak
CSCI 2010

Documentinformatie

Geüpload op
21 maart 2026
Aantal pagina's
18
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$13.99
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Brainariam Harvard University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
147
Lid sinds
1 jaar
Aantal volgers
7
Documenten
8374
Laatst verkocht
5 uur geleden

Our store offers a wide selection of materials on various subjects and difficulty levels, created by experienced teachers. We specialize on NURSING,WGU,ACLS USMLE,TNCC,PMHNP,ATI and other major courses, Updated Exam, Study Guides and Test banks. If you don't find any document you are looking for in this store contact us and we will fetch it for you in minutes, we love impressing our clients with our quality work and we are very punctual on deadlines. Please go through the sets description appropriately before any purchase and leave a review after purchasing so as to make sure our customers are 100% satisfied. I WISH YOU SUCCESS IN YOUR EDUCATION JOURNEY

Lees meer Lees minder
3.3

25 beoordelingen

5
8
4
2
3
8
2
3
1
4

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen