Computer Science: A Structured Programming Approach Using C, Third Edition
Computer Science: A Structured Programming Approach Using C, Third Edition
3rd Edition
ISBN: 9780534491321
Author: Behrouz A. Forouzan, Richard F. Gilberg
Publisher: Course Technology, Inc.
Expert Solution & Answer
Book Icon
Chapter 3, Problem 25PS

Explanation of Solution

Given: The following code is given:

int a;

int b;

a = b = 50;

printf("%4d %4d",a,b);

a = a *2;

b = b / 2;

printf("%4d %4d", a, b); 

To Find: The output of the following code.

int a;

int b;

a = b = 50;

printf("%4d %4d",a,b);

a = a *2;

b = b / 2;

printf("%4d %4d", a, b);  

Solution:

The following code on being run will display the following output.

50 50 100 25

The program declares a and b as variables.

The reserved word, int, indicates a and b with integer values stored in the computer.

In the second step, the program store the values of a and b, that is, 50...

Blurred answer
Students have asked these similar questions
Find the voltage V0 across the 4K resistor using the mesh method or nodal analysis. Note: I have already simulated it and the value it should give is -1.714V
Resolver por superposicion
Describe three (3) Multiplexing techniques common for fiber optic links

Chapter 3 Solutions

Computer Science: A Structured Programming Approach Using C, Third Edition

Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning