Home / MCQ Bank / Computer
Computer Variables And Data Types In C Plus Plus

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

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • 234

Related Computer Questions

Using ODL, you can define which of the following? Which of the following selector selects elements that do not match the selector s? Which of following is not accepted in C? Which sorting algorithm uses a "pivot" element to partition the array into sub-arrays? Topological sort can be implemented by?