Variable and Comment in C++ MCQs Exercise II

Ques 1 Variable and Comment


What is the output of the following C++ code?


#include<iostream>
using namespace std;
int main()
{
    char ch= 98;
    cout<<ch;
    return 0;
}

A a
B A
C b
D B

Ques 2 Variable and Comment


What is the output of the following C++ Code?

int main()
{
   const int num=100;
   num++;
   cout<<num;
   return 0;
}

A 100
B 101
C Compilation Error
D None of these