Vidyalelo
C++ Programming · Q63

Variables and Data Types in C++

Programming · C++ Programming · question 63

Q63

What will be the output of the following C++ code? #include using namespace std; void addprint() static int s = 1; s++; cout << s; int main() addprint(); addprint(); addprint(); return 0;

A.
234
Answer
B.
111
C.
123
D.
235

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board