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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the advantage of using #define to declare a constant?

616


Differentiate between calloc and malloc.

751


what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9

1426


What is d'n in c?

630


What are pointers? What are stacks and queues?

573






What is 'bus error'?

641


Explain argument and its types.

598


Differentiate between a structure and a union.

758


How to set file pointer to beginning c?

662


Write a program to generate random numbers in c?

658


hi, which software companys will take,if d candidate's % is jst 55%?

1660


given post order,in order construct the corresponding binary tree

2320


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

904


How do you redirect a standard stream?

618


What is the difference between text and binary modes?

639