100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

CSCI 121 FINAL EXAM 2025 WITH 100% ACCURATE SOLUTIONS

Rating
-
Sold
-
Pages
33
Grade
A+
Uploaded on
03-12-2024
Written in
2024/2025

CSCI 121 FINAL EXAM 2025 WITH 100% ACCURATE SOLUTIONS

Institution
CSCI 121
Course
CSCI 121











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CSCI 121
Course
CSCI 121

Document information

Uploaded on
December 3, 2024
Number of pages
33
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

CSCI 121 FINAL EXAM 2025 WITH 100%
ACCURATE SOLUTIONS


When you have a function that expects an array, it should also
expect the size of the array or the number of indexed variables
with valid data. (T/F) - Answer True


How many indexed variables does the following array have? int
myArray[12]={1,2,3,6,5,4,7,1,2}; - Answer 12


In the expression
cout << score[i]<< endl;
i is called the ________. - Answer index


The computer remembers the address of which indexed
variable(s) in an array? - Answer 0


What is wrong with the following code?
float total[8], scores[10];
a.) The 10 should be replaced with a variable name, whose value
is input from the user.

,b.) Cannot declare two array variables with different size
together.
c.) Cannot declare two array variables together
d.) nothing - Answer D


What is wrong with the following code fragment?
const int SIZE=5;
float scores[SIZE];
for( int i=0; i<=SIZE; i++){
cout<<"Enter a score";
cin>>scores[i];
}
a.) Array indexes start at 1 not 0.
b.) Arrays must be integers.
c.) Array indexes must be less than the size of the array.
d.) Should be cin >> scores[0]; - Answer C


Which of the following function declarations could be used to
input data from the keyboard into the array?
a.) void input(int array[], int &numElements, int MAX_SIZE);
b.) void input(int array[], int numElements, int MAX_SIZE);
c.) void input(int &array[], int numElements, int MAX_SIZE);

,d.) int array[] input(int array[], int &numElements, int
MAX_SIZE); - Answer A


Which of the following will correctly assign all the values in one
array to the other array? (Assume both arrays are of the same
type and have SIZE elements.)
a.) array1=array2;
b.) array1[]=array2;
c.) for(i=0;i<SIZE;i++)
array1[i]=array2[i];
d.) for(i=0;i<SIZE;i++)
array1[]=array2[]; - Answer C


The following code declares a vector of characters.vector
characters<char>
(T/F) - Answer False


Vector assignment is well behaved. (T/F) - Answer True


A string variable and a c-string are the same data type. (T/F) -
Answer False

, The function used to "put two c-strings together into one" is
called ________. - Answer strcat


A character array terminated with the null character is most
correctly called______.
a.) a c-string.
b.) a character array.
c.) a string.
d.) None of these. - Answer A


What is the value of numbers.size() after the following code?
vector<float>numbers;
numbers.reserve(100); - Answer 0


When the extraction operator is used to read data into a string
a.) it skips all white spaces.
b.) it skips only new lines.
c.) it reads everything on the line.
d.) it reads as many characters that will fit into the c-string. -
Answer A

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
YANCHY Herzing University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1747
Member since
3 year
Number of followers
1158
Documents
23184
Last sold
22 hours ago
Ace Your Exams with Elite Study Resources | ExamEliteHub on Stuvia

I offer genuine and dependable exam papers that are directly obtained from well-known, reputable institutions as a highly regarded professional who specializes in sourcing study materials. These papers are invaluable resources made to help people who want to become nurses and people who work in other fields prepare for exams. Because of my extensive experience and in-depth knowledge of the subject, I take great care to ensure that each exam paper meets the highest quality, accuracy, and relevance standards, making them an essential component of any successful study plan.

Read more Read less
4.1

445 reviews

5
251
4
57
3
84
2
18
1
35

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions