While browsing some C ++ blogs recently, I came across a small C-teaser program in one of them.
#include<stdio.h>
int find_addr()
{
}
int main()
{
int i,j;
clrscr();
find_addr();
return 0;
}
The question is to find the address of the variables i and j without touching the main function. I still could not figure it out. It feels terrible that I could not even solve this secondary question: ((.
EDIT:
There were many non-standard statements in the above program, such as using conio.h anbd of other non-standard headers and its functions, getch () and other operators, I edited it in a hurry and forgot to omit void from void main (), sorry for that.
EDIT2: I gave my only vote to close this topic as I perceive the answers posted here that there are non-standard questions related to the question.