What is the value of a when the program is run? int a-0, x-3, y-4,2-5, if (x+y) a-x if(y-2) a-y if(x) az Select one O a5 Ob3 Oc4 O do

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

Pa help po, (MULTIPLE CHOICE)

1.
2.
3.
What is the value of a when the program is run?
int a=0, x=3, y=4, z=5;
if (x>y) a=x;
if (y>z) a=y,
if(z>x) a z
Select one:
O a. 5
O b. 3
O c. 4
O d.o
Which of the following statements evaluate to FALSE?
Select one:
O a. 12+ 20 % 10-12 > 40-20*2
O b. 9
10 && (0 || ! TRUE)
O c. 12 % 7+5 * 2/2 <= 18-4*3/5
O d. 8+10 % 7 < 5*35/10
Given the code:
int y = 1, m, x-3;
for (m-1; m<xm++) {
y*= m;
}
printf("%d",y);
What is the outputted value of var y?
Select one:
O a. 1
O b. 6
O c.0
O d. 3
4.
6.
Consider the code:
int ctr=1,x=0;
do{
while(ctr<=3){
x+= 3; printf("%d ",x);
ctr+=1;}
X=X-7;
printf("%d",x);
ctr=2;
}while (x!=0);
Which of the following output is correct?
Select one:
O a. 456 2 81 470
O b. 369281470
O c. 3692581470
O d. 369 1228140
What will be printed on screen based on the following code fragment?
int k = 50;
do {
if(k % 4 == 0)
printf("%d", k);
k++;
}while(k <= 70);
Select one:
O a. 50 54 58 62 66 70
O b. 52 56 60 64 68
O c. 58 62 66 70
O d. 52 56 60 64 68 70
Transcribed Image Text:1. 2. 3. What is the value of a when the program is run? int a=0, x=3, y=4, z=5; if (x>y) a=x; if (y>z) a=y, if(z>x) a z Select one: O a. 5 O b. 3 O c. 4 O d.o Which of the following statements evaluate to FALSE? Select one: O a. 12+ 20 % 10-12 > 40-20*2 O b. 9 10 && (0 || ! TRUE) O c. 12 % 7+5 * 2/2 <= 18-4*3/5 O d. 8+10 % 7 < 5*35/10 Given the code: int y = 1, m, x-3; for (m-1; m<xm++) { y*= m; } printf("%d",y); What is the outputted value of var y? Select one: O a. 1 O b. 6 O c.0 O d. 3 4. 6. Consider the code: int ctr=1,x=0; do{ while(ctr<=3){ x+= 3; printf("%d ",x); ctr+=1;} X=X-7; printf("%d",x); ctr=2; }while (x!=0); Which of the following output is correct? Select one: O a. 456 2 81 470 O b. 369281470 O c. 3692581470 O d. 369 1228140 What will be printed on screen based on the following code fragment? int k = 50; do { if(k % 4 == 0) printf("%d", k); k++; }while(k <= 70); Select one: O a. 50 54 58 62 66 70 O b. 52 56 60 64 68 O c. 58 62 66 70 O d. 52 56 60 64 68 70
Expert Solution
steps

Step by step

Solved in 3 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