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

Answers were Sorted based on User's Feedback



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

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

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

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

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

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

Post New Answer

More C Interview Questions

Program to swap the any two elements in an array containing N number of elements?

1 Answers   Bosch, Glenwood, Ugam Solutions,


define string ?

0 Answers  


a linear linked list such that the link field of its last node points to the first node instead of containing NULL a) linked list b) circular linked list c) sequential linked list d) none

0 Answers  


What is atoi and atof in c?

0 Answers  


i want the code for printing the output as follows 4 4 3 3 2 2 1 1 0 1 1 2 2 3 3 4 4

2 Answers  






What is the use of linkage in c language?

0 Answers  


How can I access an I o board directly?

0 Answers  


how to implement stack operation using singly linked list

2 Answers  


why u join this call center?

6 Answers   DELL,


What is the difference between typedef and #define?

0 Answers  


What is the scope of local variable in c?

0 Answers  


#include<stdio.h> main() {int i=1;j=1; for(;;) {if(i>5) break; else j+=1; printf("\n%d",j) i+=j; } }

7 Answers   HCL,


Categories