void main()
{
int i=5;
printf("%d",i+++++i);
}

Answer Posted / visu

i+++++i=i++ + ++i
remember this expression is nothing but adding two i's

now unary operators hav higher precedence than binary
=>++ executes first
so i++ =5 (since value changes after statement)
and ++i makes it i=6

as i said its jus adding to i's
now ans=i+i=6+6=12

Is This Answer Correct ?    15 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

1842


can any one tel me wt is the question pattern for NIC exam

1556


What is the best way to store flag values in a program?

579


What is use of #include in c?

592


How a string is stored in c?

587






What is meant by type casting?

625


What is a scope resolution operator in c?

747


What are the different types of constants?

638


Why & is used in scanf in c?

623


Explain main function in c?

624


Explain how do you declare an array that will hold more than 64kb of data?

902


Explain what is a static function?

630


How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same

649


Define circular linked list.

571


How will you declare an array of three function pointers where each function receives two ints and returns a float?

777