Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 100

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

Answer:

void main()
{
int i=i++,j=j++,k=k++;
printf(“%d%d%d”,i,j,k);
}


Answer:
Garbage values.


Explanation:
An identifier is available to use in program code from the point of its declaration.
So expressions such as i = i++ are valid statements. The i, j and k are automatic variables and so they contain some garbage value. Garbage in is garbage out (GIGO).

Share: 
 

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


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


Tagged: