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

#include<stdio.h> #include<conio.h> void main() {clrscr(); char another='y'; int num; for(;another=='y';) { printf("Enter a number"); scanf("%d",&num); printf("squre of %d is %d",num,num*num); printf("\nwant to enter another number y/n"); scanf("%c",&another); } getch(); } the above code runs only one time.on entering 'y' the screen disappeares.what can i do?

3 Answers  


What is a const pointer?

0 Answers  


Is it possible to use curly brackets ({}) to enclose single line code in c program?

0 Answers  


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

1 Answers   ABC,


Do you know the difference between malloc() and calloc() function?

0 Answers  


Difference between goto, long jmp() and setjmp()?

0 Answers   EXL,


Write a C program linear.c that creates a sequence of processes with a given length. By sequence it is meant that each created process has exactly one child. Let's look at some example outputs for the program. Here the entire process sequence consists of process 18181: Sara@dell:~/OSSS$ ./linear 1 Creating process sequence of length 1. 18181 begins the sequence. An example for a sequence of length three: Sara@dell:~/OSSS$ ./linear 3 Creating process sequence of length 3. 18233 begins the sequence. 18234 is child of 18233 18235 is child of 18234 ........ this is coad .... BUt i could not compleate it .....:( #include <stdio.h> #include <sys/types.h> #include <unistd.h> #include <stdlib.h> int main(int argc, char *argv[]) { int N; pid_t pid; int cont; if (argc != 2) { printf("Wrong number of command-line parameters!\n"); return 1; } N = atoi(argv[1]); printf("Creating process sequence of length %d.\n",N); printf("%d begins the sequence.\n",getpid()); /* What I have to do next ?????? */ }

0 Answers  


What are dangling pointers? How are dangling pointers different from memory leaks?

1 Answers  


What are predefined functions in c?

0 Answers  


1.Why do you call C is middle level language? 2.Why do you call C is userfriendly language.

2 Answers  


What is const keyword in c?

0 Answers  


Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......

0 Answers  


Categories