Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 90

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

Answer:

main()
{
char *p;
p="%d\n";
p++;
p++;
printf(p-2,300);
}


Answer:
300


Explanation:
The pointer points to % since it is incremented twice and again decremented by 2, it points to '%d\n' and 300 is printed.

Share: 
 

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


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


Tagged: