Array in C++ MCQs Exercise I

Ques 1 Array


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


#include <iostream>  
using namespace std;  
int main()  
{  
      char str[] = {'a', 'b', 'c'};  
      cout << 1[str];  
      return 0;  
}  

A 98
B 66
C A
D a

Ques 2 Array


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


#include <iostream>  
using namespace std;  
int main()  
{  
      char str[] = {'a', 'b', 'c'};  
      cout << -1[str];  
      return 0;  
}  

A -98
B -66
C A
D a