Why can arithmetic operations not be performed on void pointers?



Why can arithmetic operations not be performed on void pointers?..

Answer / Atul Kumar Pal

Arithmetic operations cannot be performed on void pointers in C because their type does not provide any information about the size or data representation they point to. Void pointers are used solely as a general-purpose pointer type.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

WHAT IS INT?

8 Answers   Accenture,


while initialization of array why we use a[][2] why not a[2][]...?

1 Answers   Aptech,


What is the difference between array_name and &array_name?

1 Answers  


What is wrong with this declaration?

1 Answers  


disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit

1 Answers  


How can I find the modification date of a file?

1 Answers   Celstream,


A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above

2 Answers   Accenture,


where does malloc() function get the memory?

1 Answers  


Explain Function Pointer?

1 Answers   Wipro,


why 'c' is called middle level language.

2 Answers  


no consistent academics. how to answer the question

0 Answers  


How do we print only part of a string in c?

1 Answers  


Categories