What is the value of x after execution of the following code segment?

int x = 2;
int c = 0;
while (c < 3)
{
x = x * 2;
c = c + 1;
}
x = x + 1;

a) 9
b) 17
c) 23
d) 33


b) 17

Computer Science & Information Technology

You might also like to view...

Which of the following statements is false?

a. The command window in Windows is called a Command Prompt. b. The command window in OS X is called a Terminal. c. The command window in Linux is called the shell. d. All of the above are true.

Computer Science & Information Technology

ebXML is an acronym for_________.

What will be an ideal response?

Computer Science & Information Technology

By inheriting from the Exception class, you gain access to methods contained in the ____.

A. derived class B. subclass C. child class D. parent class

Computer Science & Information Technology

Eve installed some spyware software on 100 USB flash drives and has designed this software to autoload from these drives along with some nude photos. She then painted the logo of a well-known adult magazine on each one and randomly scattered these flash drives in the parking lots of several of the big defense companies in her town. What type of malware attack is this and what vulnerability is she

trying to exploit in order to get her malware code past the network firewalls of these companies? What will be an ideal response?

Computer Science & Information Technology