Why n++ execute faster than n+1 ?

Answers were Sorted based on User's Feedback



Why n++ execute faster than n+1 ?..

Answer / hrpynux@gmail.com

The expression n++ requires a single machine instruction such as INR to carry out the increment operation whereas, n+1 requires more instructions to carry out this operation.

Is This Answer Correct ?    1 Yes 0 No

Why n++ execute faster than n+1 ?..

Answer / hrpynux@gmail.com

The expression n++ requires a single machine instruction such as INR to carry out the increment operation whereas, n+1 requires more instructions to carry out this operation.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What is the sizeof () operator?

0 Answers  


What is difference between array and structure in c?

0 Answers  


Give the output for the following program. #define STYLE1 char main() { typedef char STYLE2; STYLE1 x; STYLE2 y; clrscr(); x=255; y=255; printf("%d %d\n",x,y); }

2 Answers   ADITI,


How do you construct an increment statement or decrement statement in C?

0 Answers  


What is the use of typedef in structure in c?

0 Answers  






What is a file descriptor in c?

0 Answers  


Why is python slower than c?

0 Answers  


What is volatile

2 Answers  


What does nil mean in c?

0 Answers  


what is the output of the code and how? main() { int *ptr,x; x=sizeof(ptr); printf("%d",x); }

1 Answers  


main() { int x=20,y=35; x = y++ + x++; y = ++y + ++x; printf("%d %d\n",x,y); } what is the output?

10 Answers   Ramco,


What is the difference between new and malloc functions?

0 Answers   InterGraph,


Categories