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

write a progrmm in c language take user interface generate table using for loop?

0 Answers  


write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a<b,printb.find the sum digits of that number & then print.if a==b multiply 10 with a & add 20 with b store in c and then print

0 Answers  


Explain how can a program be made to print the name of a source file where an error occurs?

0 Answers  


Can you please explain the difference between malloc() and calloc() function?

0 Answers  


Write a program using two-dimensional array that lists the odd numbers and even numbers separately in a 12 input values.

1 Answers  






What is meant by keywords in c?

0 Answers  


the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function

0 Answers  


write a program to find the sum of the array elements in c language?

24 Answers   ICT, Infosys, Wipro,


what is the need for main function in c?

5 Answers  


in linking some of os executables are linking name some of them

0 Answers   IBM,


What is the significance of scope resolution operator?

0 Answers   Agilent, ZS Associates,


How can I run c program?

0 Answers  


Categories