what is the difference between postfix and prefix unary
increment operators?

Answer Posted / bhupender

PER FIX UNARY INCREMENT OPERATION IS ++I
POSTT FIX UNARY INCREMENT OPERATION IS i++
WHEN WE USE THIS IN PROGRAM THE RESULT WILL
FOR ++i IS

LIKE TWO VERIABLE INT A=5 AND B=++A+5 THEN
IN RESULT IT SHOWS A =5 BUT B WILL 10(5+5)
BUT IN POST FIX IT
A=5 BUT B= A++ MEANS A+1 AND RESULT FOR B WILL 11

Is This Answer Correct ?    2 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is better pointer or array?

597


What oops means?

583


Tell me what are bitwise shift operators?

658


Why void main is used in c?

559


What are the 5 types of organizational structures?

550






Explain what is the benefit of using an enum rather than a #define constant?

722


How do I swap bytes?

628


What are enumerated types?

655


Explain can you assign a different address to an array tag?

648


Explain what are the advantages and disadvantages of a heap?

597


In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.

2684


Is c is a high level language?

621


How can I automatically locate a programs configuration files in the same directory as the executable?

632


What are local static variables?

619


What is the purpose of main( ) in c language?

620