a) 9
b) 8
c) 0
d) Programmer-defined
Answer: b
Explanation: Because the first element always starts at 0. So it is on 8 position.
Related Posts
Which function is used to check whether a character is a tab or space?
Which function is used to check whether a character is a number?
Which function is used to check whether a character is an alphabet or number?
Which function is used to check whether a character is an alphabet?
What we can’t do on a void pointer?
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int a = 5, c;
void *p = & a;
double b = 3.14;
p = & b;
c = a + b;
cout << c << ‘\n’ << p;
return 0;
}What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int n = 5;
void *p = & n;
int *pi = static_cast< int*>(p);
cout << *pi << endl; return 0; }
Join The Discussion