[LCP]Printing a Variables Value..!!!

Frederic Ros fros at amadeus.net
Sun Jun 22 06:48:01 UTC 2003


Hi,

I think Greg. would say : "look closer" ;)

http://www.eskimo.com/~scs/C-faq/q20.6.html

Fred.




From:  "J.Mohamed Zahoor" <zahoor at midascomm.com>@lists.linux.org.au  on
       20/06/2003 17:31 ZE5B

Please respond to linuxcprogramming at lists.linux.org.au

Sent by:    linuxcprogramming-admin at lists.linux.org.au


                                                                          
 To:    Cmailinglist                                                      
        <linuxcprogramming at lists.linux.org                                
        .au>                                                              
                                                                          
                                                                          
 cc:                                                                      
                                                                          
                                                                          
                                                                          
                                                                          
                                                                          
                                                                          
 Subjec Re: [LCP]Printing a Variables                                     
 t:     Value..!!!                                                        
                                                                          
                                                                          
                                                                          





Hi Greg..
Iam afraid that this query does not seek clarification from the FAQ
you have indicated...Perhaps you may have to look at the question
once again ....

main()
{
   int aaa =10, bbb =20, ccc =30;
   char varName[20];

   memset(varName,0,20);
   printf ("Enter any variable name\n");
   gets(varName);  /* Assume i entered aaa */

   Do something here to print the value of aaa
   without implementing additional data structures
   like constructing a jump table that maps variable
   name string with that variables address...
}

This can be done by searching the symbol table with the
variables name... But that is too cumbersome.. is there
a simple way to do this...!!!!

Anyway thanx for ur reply GREG...!!!
./zahoor

> See the comp.lang.c FAQ at:
>
>     http://www.eskimo.com/~scs/C-faq/top.html
>
> It will give you a hint about handling this.
>
> And always read the FAQ before asking questions like this.
>
> Greg
> _______________________________________________
> This is the Linux C Programming List
> :  http://lists.linux.org.au/listinfo/linuxcprogramming List



_______________________________________________
This is the Linux C Programming List
:  http://lists.linux.org.au/listinfo/linuxcprogramming List









More information about the linuxCprogramming mailing list