Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 24

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

Answer:

#define clrscr() 100
main()
{
clrscr();
printf("%d\n",clrscr());
}


Answer:
100


Explanation:
Preprocessor executes as a seperate pass before the execution of the compiler. So textual replacement of clrscr() to 100 occurs.The input program to compiler looks like this :
main()
{
100;
printf("%d\n",100);
}

Note:
100; is an executable statement but with no action. So it doesn't give any problem

Share: 
 

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


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


Tagged: