Will the following program execute? void main()
{
void *vptr = (void *) malloc(sizeof(void));
vptr++;
}
It will throw an error, as arithmetic operations cannot be performed on void pointers.
{
void *vptr = (void *) malloc(sizeof(void));
vptr++;
}
It will throw an error, as arithmetic operations cannot be performed on void pointers.
 04:09
04:09
 AtoZ C++ Interview Questions, AtoZ CPP Objective Type Questions, AtoZ C++ Study Material
AtoZ C++ Interview Questions, AtoZ CPP Objective Type Questions, AtoZ C++ Study Material
 
 
0 comments:
Post a Comment