What is the output of the following code segment?

int p = 5, t = 2, c = 0;
while (c < 3)
{
p *= t;
c++;
}
cout << p;

a) 10
b) 20
c) 40
d) 80


`c) 40

Computer Science & Information Technology

You might also like to view...

________ allow users to extract records that meet specific criteria that answers a question

Fill in the blank(s) with correct word

Computer Science & Information Technology

Write a single statement or a set of statements to accomplish each of the following:

a) Define a structure called Part containing int variable partNumber and char array part-Name, whose values may be as long as 25 characters. b) Define PartPtr to be a synonym for the type Part *. c) Use separate statements to declare variable a to be of type Part, array b[ 10 ] to be of type Part and variable ptr to be of type pointer to Part. d) Read a part number and a part name from the keyboard into the members of variable a. e) Assign the member values of variable a to element three of array b. f) Assign the address of array b to the pointer variable ptr. g) Print the member values of element three of array b, using the variable ptr and the structure pointer operator to refer to the members.

Computer Science & Information Technology

The formatting mark that represents a tab is a(n):

A) series of oval dots B) arrow C) long bracket D) long dash

Computer Science & Information Technology

What is the purpose of SIP in VoIP?

A) It carries voice and data. B) It connects the VoIP phone to an analog phone. C) It sets up the VoIP phone calls. D) It works with a PBX.

Computer Science & Information Technology