which of 'arrays' or 'pointers' are faster?
Answers were Sorted based on User's Feedback
array is faster than pointer because accessing array elements
by pointers always faster.there is used one array and more pointer.we know pointer is a "value at address".
so pointers stores only address of variable but arrays are stores similar data types.
| Is This Answer Correct ? | 10 Yes | 1 No |
Answer / andeep singh
Pointer is faster than array if there is only one pointer used
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / narendra
arrays are very faster because it stores a sequential
block of memory and similar data types
pointers stores only adders of variable
but arrays are stores similar data types
| Is This Answer Correct ? | 9 Yes | 4 No |
Answer / sandeep
when compared pointers work fast ,beacause:
1.array too is pointer
eg:char s[20];
gets(s);
here we are supplying base address.
2.array notation will be inter coverted as pointers
where we can directly use pointers.
| Is This Answer Correct ? | 0 Yes | 0 No |
char p="data"; printf(p);
Write a function in c to find the area of a triangle whose length of three sides is given.
write an algorithm to display a square matrix.
What oops means?
6)swap(int x,y) { int temp; temp=x; x=y; y=temp; } main() { int x=2;y=3; swap(x,y); } after calling swap ,what are yhe values x&y?
Describe static function with its usage?
Define VARIABLE?
YBJBU6
Explain how do I determine whether a character is numeric, alphabetic, and so on?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321