what is difference between declaring the pointer as int and
char in c language?
Answer Posted / k vishwanath pillay
While declaring Pointer for an Integer value, we assign a
default size i.e 4 byte of memory for the Integer variable.
But in the case of char by default it assigns 1 byte of
memory for that character variable.
The type of declaration is the same for both.
Char a[5], *p; // for char variable
int *i; // for Int variable
| Is This Answer Correct ? | 5 Yes | 10 No |
Post New Answer View All Answers
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
What is a built-in function in C?
Which is best linux os?
What is the use of ?: Operator?
What is the difference between constant pointer and constant variable?
What is double pointer?
Can a void pointer point to a function?
Explain the use of 'auto' keyword in c programming?
What is c basic?
What are the advantages and disadvantages of pointers?
Can a program have two main functions?
What are pointers in C? Give an example where to illustrate their significance.
Can stdout be forced to print somewhere other than the screen?
Do pointers store the address of value or the actual value of a variable?
What is a void pointer? When is a void pointer used?