-
What is the output of this program?
#include
using namespace std;
int main()
{
int num;
char ch;
void *value;
num = 5;
ch = 'd';
value = #
cout << "The value points to the integer value " << value << endl;
value = &ch;
cout << "The value now points to the character " << value;
return 0;
}
-
- The value points to the integer value 0x7c9edb4e77ec
- The value now points to the character 0x7c9edb4e77eb
- Compilation Error
- The value points to the integer value 0x7c9edb4e77ec
The value now points to the character 0x7c9edb4e77eb - 5
Correct Option: D
Because the data points to the address value of the variables only, So it is printing the memory address of these two variable.