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

Can a void pointer point to a function?

563


How #define works?

607


find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2

1522


What is a far pointer in c?

590


Explain what are the different data types in c?

747






In which language linux is written?

595


How to declare a variable?

562


What is the difference between memcpy and memmove?

595


What is string function c?

561


Describe the order of precedence with regards to operators in C.

628


What is c definition?

735


Why #include is used in c language?

588


What is c basic?

591


What do you mean by keywords in c?

617


what are non standard function in c

1426