02: What ia the output for the following codes: 1- b) 12 6 9 3 d) 39 6 int arr(4)- (12, 6. 9. 3): for (int i 3; -0; i--) a) 12 69 e) 396 12 cout<

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
02: What is the output for the following codes:
1-
b) 12 € 9 3
d) 39 6
int arr(4)= (12, 6. 9, 3}:
for (int i= 3; p-0; i-)
a) 12 6 9
c) 39 6 12
cout<<arr[i) <<" ";
2-
a) 10 5
c) 10 5 79
b) 10
d) 10 5 7
int arrf4)= (10, 5, 7, 9};
for (int i- 0; i<2; i++)
cout<<amfi<<" ";
3-
a) 47 10 6
e) 14733
b) 47 10
d) 147
int arrf4)= [1, 4, 7,3):
for (int i= 0; i4; it+)
cout<<arrfi) + 3c< ";
b) e5 34
d) 8 5 4
int arr(4)- [8, 5. 3. 4);
for (int i- 0; i<3; it+)
cout<<arrfi) -3 << ";
a) 5 20
e) 5 201
a) 24133 b) € 12 3 9
e) 6 12 1
int an(4)= (2. 4, 1, 3):
for (int i- 0, i4; i++)
cout<<arr(i) * 3 <« * ";
d) 2413
a) 3 33
c) 8
b) 3
d) 8 888
int arr[4)= {1, 3, 8, 4);
for (int i- 0; i4; i++)
cout<<ar(2)<<" :
7-
aj 4 49 36
c) 276
b) 27
a) 4 49 36 9
int arr[4)= (2, 7, 6, 3);
for (int i- 0; i-2; itt)
cout<<arrfi] * arrfi]« *
Transcribed Image Text:02: What is the output for the following codes: 1- b) 12 € 9 3 d) 39 6 int arr(4)= (12, 6. 9, 3}: for (int i= 3; p-0; i-) a) 12 6 9 c) 39 6 12 cout<<arr[i) <<" "; 2- a) 10 5 c) 10 5 79 b) 10 d) 10 5 7 int arrf4)= (10, 5, 7, 9}; for (int i- 0; i<2; i++) cout<<amfi<<" "; 3- a) 47 10 6 e) 14733 b) 47 10 d) 147 int arrf4)= [1, 4, 7,3): for (int i= 0; i4; it+) cout<<arrfi) + 3c< "; b) e5 34 d) 8 5 4 int arr(4)- [8, 5. 3. 4); for (int i- 0; i<3; it+) cout<<arrfi) -3 << "; a) 5 20 e) 5 201 a) 24133 b) € 12 3 9 e) 6 12 1 int an(4)= (2. 4, 1, 3): for (int i- 0, i4; i++) cout<<arr(i) * 3 <« * "; d) 2413 a) 3 33 c) 8 b) 3 d) 8 888 int arr[4)= {1, 3, 8, 4); for (int i- 0; i4; i++) cout<<ar(2)<<" : 7- aj 4 49 36 c) 276 b) 27 a) 4 49 36 9 int arr[4)= (2, 7, 6, 3); for (int i- 0; i-2; itt) cout<<arrfi] * arrfi]« *
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

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