what is difference between declaring the pointer as int and
char in c language?
Answers were Sorted based on User's Feedback
Answer / karan
means of integer pointer a pointer variable which contains
a address of an integer value...means the address in the
pionter variable points to a integer type value....
And the means of chracter pointer, pionter variable is
contain a integer address of a character type value..
| Is This Answer Correct ? | 11 Yes | 2 No |
Answer / 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 |
Answer / 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 |
Q. where is the below variables stored ? - volatile, static, register
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
Why isn't any of this standardized in c? Any real program has to do some of these things.
In a header file whether functions are declared or defined?
what is the self-referential structure?
What is the difference between local variable and global variable in c?
write a “Hello World” program in “c” without using a semicolon?
What is void main () in c?
What does main () mean in c?
dibakar & vekatesh..uttejana here..abt ur reply for in place reversal of linked list..wats p stands for there?
What is malloc and calloc?
How do i store a paragraph into a string? for example, if i input a long paragraph, the program will read the words one by one and concatenate them until no word is left.