Question
a)
firstName = ['Joe','Bob','Frank','Hans']
lastName = ['Smith','Seger','Sinatra','Schultze']
heightInCM = [169,158,201,199]
for i in xrange(len(firstName)):
print "Name:",firstName[i], lastName[i]
print "Height in CM:,",heightInCM[i]
b)
firstName = ['Joe','Bob','Frank','Hans']
lastName = ['Smith','Seger']
heightInCM = [169,158]
for i in xrange(len(firstName)):
print "Name:",firstName[i], lastName[i]
print "Height in CM:,",heightInCM[i]
c)
firstName = ['Joe','Bob']
lastName = ['Smith','Seger','Sinatra','Schultze']
heightInCM = [169,158]
for i in xrange(len(firstName)):
print "Name:",firstName[i], lastName[i]
print "Height in CM:,",heightInCM[i]
d) None of the mentioned
a.
a
b.
b
c.
c
d.
d
Posted under Data Structures and Algorithms
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Which of the following can be called a parallel array implementation?
Similar Questions
Discover Related MCQs
Q. What are the advantages of parallel arrays over the traditional arrays?
View solution
Q. What are some of the disadvantages of parallel arrays?
View solution
Q. What is a sorted array?
View solution
Q. To search for an element in a sorted array, which searching technique can be used?
View solution
Q. What are some of the applications of sorted arrays?
View solution
Q. What is the worst case time complexity of inserting an element into the sorted array?
View solution
Q. What is a sparse array?
View solution
Q. When do you use a sparse array?
View solution
Q. What is the difference between a normal(naive) array and a sparse array?
View solution
Q. Suppose the contents of an array A are, A = {1, null, null, null, null, 10};
What would be the size of the array considering it as a normal array and a sparse array?
View solution
Q. What is sparsity of a matrix?
View solution
Q. What are the advantages of sparse matrices over normal matrices?
View solution
Q. What is the order of a matrix?
View solution
Q. Which of the following property does not hold for matrix multiplication?
View solution
Q. How do you allocate a matrix using a single pointer in C?(r and c are the number of rows and columns respectively)
View solution
Q. If row-major order is used, how is the following matrix stored in memory?
a b c
d e f
g h i
View solution
Q. If column-major order is used, how is the following matrix stored in memory?
a b c
d e f
g h i
View solution
Q. Which of the following are the uses of matrices?
View solution
Q. What is the disadvantage of matrices?
View solution
Q. Matrix A when multiplied with Matrix C gives the Identity matrix I, what is C?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Data Structures and Algorithms? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!