Printing Formal Parameters

Joined
Apr 14, 2009
Messages
1
Reaction score
0
#include "stdafx.h"

void add(int,int)

{
printf("Checking \n" );

}


int _tmain(int argc, _TCHAR* argv[])
{

int a=5,b=6;

add(a,b);

return 0;

}

I was just trying this and I was surprised to see that it compiled with no errors. Someone explained to me that the compiler takes the arguments and assigns them to dummy variable that it (the compiler) creates.
I would like to know if there is any method to access them ie to print the values of these dummy variables or to do any operation on them.
Here the dummy variables have the values 5 and 6. i would like to print them. I'm using visual studio 2005 environment.

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top