Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by whitelisting our website.

Cpp Programming Quiz 102 – What will be the output of the following program?

Question: What will be the output of the following program?

#include
class IndiaBix
{
static int count;
public:
static void First(void)
{
count = 10;
}
static void Second(int x)
{
count = count + x;
}
static void Display(void)
{
cout<< count << endl; } }; int IndiaBix::count = 0; int main() { IndiaBix :: First(); IndiaBix :: Second(5); IndiaBix :: Display(); return 0; }

[A].0
[B].5
[C].10
[D].15 

Answer: Option D