what is difference between declaring the pointer as int and
char in c language?

Answer Posted / abhay3023

The first obvious difference is char pointer will store address of character variable and same way integer pointer will store address of integer variable.

But the main difference you will feel when do increment on both these pointers, integer pointer will get incremented by 4 bytes and character pointer will get incremented by 1 bytes.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the advantages and disadvantages of macros.

620


Is return a keyword in c?

594


Can we declare variable anywhere in c?

533


Why enum is used in c?

524


Explain what is the difference between a string and an array?

629






main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above

612


When should we use pointers in a c program?

626


What is array of pointers to string?

564


what is different between auto and local static? why should we use local static?

638


What is the explanation for cyclic nature of data types in c?

642


What is function what are the types of function?

554


Write a c program to demonstrate character and string constants?

1678


Explain the difference between call by value and call by reference in c language?

643


What tq means in chat?

579


Is printf a keyword?

755