Point out an error in the program.
Point out an error in the program.
#include <iostream>
using namespace std;
int main()
{
const int x=1;
int const *y=&x;
cout<<*y;
return 0;
}
A . No error
B . Error: unknown pointer conversion
C . cannot convert from ‘const int *’ to ‘int *const’
D . Compilation error
Answer: A
Latest CPA-21-02 Practice Questions with 222 Q&As
Updated Study Material | Instant Download | Detailed Answers and Explanations
Subscribe
Login
0 Comments