What will be the output of the following C++ code?

#include <iostream>
  using namespace std;
  int main()
  {
      void a = 10, b = 10;
      int c;
      c = a + b;
      cout << c;
      return 0;
  }

a) 20
b) compile time error
c) runtime error
d) 40

1 thought on “What will be the output of the following C++ code?”

Leave a Comment