Run the following C program. What is the value of variable “b” at the end of the program?

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 1TF
icon
Related questions
Question

Subject: C programming

Question 3

Run the following C program. What is the value of variable “b” at the end of the program?

 

!!! YOU NEED TO WRITE ONLY NUMBER WITHOUT ANY SPACE OR ANY OTHER CHARACTER OTHERWISE YOU CANNOT TAKE ANY POINTS !!!

 

#include <stdio.h>

int fn1(int a) {
    a = a / 2;
    a = a + 5;
    a = 9 * 6;
    return a;
}

int main() {

    int b;
    int c;
    
    b = 10;

    b = fn1(b);
    c = b;
    b = b * c;
    

    return 0;
}

 

Your answer:

 
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr