Thursday, September 10, 2009
questions of c and answer
(q) What will be output of the following program?void main(){long int a,b=5;;~a=++b + ++b + ++b;printf("%d %d",++a,++b);getch();}Output: error, L value requiredExplanation:After applying any operator in variable name it always give a value.(Type): urinary type casting operator is not exception for this. It is similar to write3456=5It is invalid c statement. Because left side of assignment
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment