Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

what is answer for perfect number????????????????

1 Answers  


what is the output for the code : main() { int i,j; printf("%d %d ",scanf("%d%d",&i,&j)); }

20 Answers   Infosys,


int i=~0; uint j=(uint)i; j++; printf(“%d”,j);

1 Answers  


Explain the red-black trees?

0 Answers  


How can I increase the allowable number of simultaneously open files?

1 Answers   ABC,


what is the purpose of the code, and is there any problem with it. bool f( uint n ) { return (n & (n-1)) == 0; }

1 Answers   Google,


#define swap1(a,b) a=a+b;b=a-b;a=a-b; main() { int x=5,y=10; swap1(x,y); printf("%d %d\n",x,y); swap2(x,y); printf("%d %d\n",x,y); } int swap2(int a,int b) { int temp; temp=a; b=a; a=temp; return; } what are the outputs?

4 Answers   Ramco,


.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

0 Answers   Wilco,


What is huge pointer in c?

0 Answers  


What are linker error?

0 Answers  


Is using exit() the same as using return?

0 Answers  


du u know test pattern for robosoft? Plz share

1 Answers   RoboSoft, TATA, Wipro,


Categories