Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
void a = 10, b = 10;
6.
int c;
7.
c = a + b;
8.
cout
Options:
A .  20
B .  compile time error
C .  runtime error
D .  none of the mentioned
Answer: Option B

void will not accept any values to its type.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers