Exam4Training

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

Exit mobile version