Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 54

  Shared By: Adah Miller    Date: Jan 24    Category: C Programming    Views: 73

Answer:

main()
{
int i=-1;
+i;
printf("i = %d, +i = %d \n",i,+i);
}


Answer:
i = -1, +i = -1


Explanation:
Unary + is the only dummy operator in C. Where-ever it comes you can just ignore it just because it has no effect in the expressions (hence the name dummy operator).

Share: 
 

Didn't find what you were looking for? Find more on C programming practical question 54 Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: