Compare array data type to pointer data type



Compare array data type to pointer data type..

Answer / Shivashish Patel

"Arrays in C are a contiguous block of memory holding elements of the same data type, while pointers are variables that store the memory address of other variables. Although arrays can behave like pointers, they have some differences: arrays provide automatic memory management and array subscripting syntax, whereas pointers require explicit memory allocation and pointer arithmetic to access elements. However, pointers offer more flexibility as they can point to any data type, not just arrays of a specific type. "

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What will happen when freeing memory twice

2 Answers  


What is the most efficient way to store flag values?

1 Answers  


Write a C program that computes the value ex by using the formula ex =1+x/1!+x2/2!+x3+3!+………….

1 Answers  


which do you prefer C or Pascal?

1 Answers  


How do you define a function?

1 Answers  


What is the purpose of clrscr () printf () and getch ()?

1 Answers  


output for following code??? main() { int x=2,y,z; x*=3+2; printf("1.%d\n",x); x*=y=z=4; printf("2.%d %d %d\n",x,y,z); x=y==z; printf("3.%d\n",x); x==(y=z); printf("%d",x); }

2 Answers   Elysium,


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

1 Answers  


Simplify the program segment if X = B then C ← true else C ← false

1 Answers  


what is the difference between <stdio.h> and "stdio.h"

14 Answers   Invendis, Kanbay, Mastek, MathWorks,


write a program to generate 1st n fibonacci prime number

2 Answers  


What are the scope of static variables?

1 Answers  


Categories