which of 'arrays' or 'pointers' are faster?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between array_name and &array_name?

783


What is && in c programming?

685


What is output redirection?

699


Explain the use of 'auto' keyword in c programming?

685


7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

2230






Differentiate between ordinary variable and pointer in c.

625


What does a pointer variable always consist of?

667


What are loops in c?

555


Describe the steps to insert data into a singly linked list.

628


Explain what does a function declared as pascal do differently?

646


What is the right way to use errno?

626


What are the basic data types associated with c?

820


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

1624


How does normalization of huge pointer works?

645


When should a type cast not be used?

630