Question
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
double arr[] = {5.0, 6.0, 7.0, 8.0};
6.
double *p = (arr+2);
7.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
double arr[] = {5.0, 6.0, 7.0, 8.0};
6.
double *p = (arr+2);
7.
cout
Answer: Option B
Was this answer helpful ?
Answer:(a)
Explanation:In this program, We are printing the values that are pointed by pointer and also the dereference oerator.
Output:
$ g++ def5.cpp
$ a.out
7
0xbf99fc98
8
5
14
Was this answer helpful ?
More Questions on This Topic :
Question 4.
Pick out the correct option.
....
Question 7.
Which is used to do the dereferencing?
....
Submit Solution