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
Similar Questions from HTET Exam - Level 3 - Year 2018
Question 1
Easy
Source :
HTET 2018
In C++, which of the following operator cannot be overloaded ?
Chapter :
Object-Oriented Programming (C++)
Topic :
OOP Concepts
Question 2
Easy
Source :
HTET 2018
In context C++, the process of individually copying each member of an object to the corresponding member of another object of the same class is…
Chapter :
Object-Oriented Programming (C++)
Topic :
OOP Concepts
Question 3
Easy
Source :
HTET 2018
Let for any relation R, IR represents operation insert into R and DR represents operation delete from R. Assume that a relation R2 has a…
Chapter :
Database Management System (DBMS) & SQL
Topic :
Database Concepts
Question 4
Easy
Source :
HTET 2018
In HTML link for e-mail can be created using which of the following?
Chapter :
Web Designing using HTML
Topic :
HTML Basics