Question
Easy

Choose most appropriate option considering that gp and ip are declared as void * and int * respectively in C++:

1
$gp=ip$ is a valid C++ statement
2
$*ip=^{*}gp$ is a valid C++ statement
3
Both (1) and (2) are valid statements
4
Neither (1) Nor (2) are valid statements
Question Details
Time to Solve: 12
Exam: HTET
Level/Paper: Level 3
Chapter: Python Programming Fundamentals
Topic: Operators & Expressions
Correct Answer
Option A
Explanation

The correct option is (1): $gp=ip$ is a valid C++ statement The explanation is based on the fundamental rules governing void pointers in C and C++. A void * pointer, often called a generic pointer, is designed to store the memory address of any data type without being tied to a specific type itself. In C++, there is a permissible and implicit conversion from any typed pointer, such as our…Read More

Choose most appropriate option - HTET Level 3 | Clear Cutoff