1. single element of an array can be passed to the function? true or false.   2. Array can be declared as constant? true or false.   3. which of the following gives the memory address of the first element in array x? a. X b. X[0] c. X{0} d. X_0 e. X(0)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

1. single element of an array can be passed to the function? true or false.

 

2. Array can be declared as constant? true or false.

 

3. which of the following gives the memory address of the first element in array x?

a. X

b. X[0]

c. X{0}

d. X_0

e. X(0)

 

4. The index of the last element of array X whose size is S?

a. S+1

b.

S-1

c. 0

d.1000

e. S

 

5. Assume you have the following declarations const int MAX = 1000;double A[MAX];which of the following sentences is incorrect?

a. The assingnment statement MAX = 1000 is mandatory.

b. we can store up to 1000 values in the mandatory.

c we cannot change the size of the array A during the runtime.

d. all values in the array are set to ZERO's (0)

e. all above sentences are correct.

 

6. The only difference between char array and string is that, the string ends with '\0'? true or false.

 

7. Index of an array can be of type integer or double, since both deals with the digits? True or False

 

8. Which definition describes the term Array precisely?

a. An array is a series of numbers of the type integers (int).

b. An array is a series of numbers of the same type either integers (int) or real (float double).

c. An array is a series of elements of the same type in continuous memory locations.

d. An array is a series of elements of the same type placed in non-continuous memory locations.

e. None of the above.

 

9. Which of the following will access the seventh element stored in array X? a. X{6}.

b. X[n-1].

c. X[7].

d. X{7}.

e. X[6].

 

10. Which one of the following is the correct declaration after including its required pre-process?

a. bool genders[] {male, female,male,male,male);

b. double x[3.0];

c. int 3A[5];

d. string namel] = {"",""};

e char key[] = ['a', 'b'];

 

11. Which of the following information is not essential in the array declaration?

a. Size (where the initializations list is not given).

b. Initializations (where the Size is given).

c. Type.

d. Name.

e. Both the Size and Initializations.

 

12. Arrays are always passed-by-reference to functions, so there is no way to prevent reflecting the functions' changes made to arrays; into the source array? True or False

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY