Examveda

What will be the output of the following C++ function?
int main()
{
    register int i = 1;
    int *ptr = &i;
    cout << *ptr;
    return 0;
}

A. 0

B. 1

C. Compiler error may be possible

D. Runtime error may be possible

Answer: Option C


Join The Discussion

Related Questions on Variables and Data Types in C plus plus