Consider the following C++ code: int n = 1; // global print1 (int x) { cout << x+ n; } plus_n () { n = n + 2; print1 (n); } main () { int n; n = 20; print1(5); n = 40; plus_n (); cout << n; } What is the output of the program under?
Consider the following C++ code: int n = 1; // global print1 (int x) { cout << x+ n; } plus_n () { n = n + 2; print1 (n); } main () { int n; n = 20; print1(5); n = 40; plus_n (); cout << n; } What is the output of the program under?
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 2 images