Which command is more efficient?
*(ptr+1) or ptr[1]

Answer Posted / purna

*(ptr+1);
Internally the same operation is performed with the next
one also.
it takes less time.

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why & is used in c?

720


What is the difference between a function and a method in c?

567


What is Dynamic memory allocation in C? Name the dynamic allocation functions.

562


What are the data types present in c?

631


What is calloc in c?

667






A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor

626


You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.

1785


What is a spanning Tree?

966


I have seen function declarations that look like this

606


What is the explanation for prototype function in c?

573


What is the c value paradox and how is it explained?

581


What is the difference between malloc() and calloc() function in c language?

609


What is the difference between exit() and _exit() function?

610


What is a rvalue?

755


What is the purpose of the preprocessor directive error?

687