LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-06-2014, 01:08 PM   #1
zinat
LQ Newbie
 
Registered: Apr 2014
Posts: 11

Rep: Reputation: Disabled
Code to find variables


Is there any way to find the variables declared or defined in a c program and print those variables??

for eg this is the code

Code:
#include<stdio.h>
 
int main()
{
   int a, b, c;
 
   printf("Enter two numbers to add\n");
   scanf("%d%d",&a,&b);
 
   c = a + b;
 
   printf("Sum of entered numbers = %d\n",c);
 
   return 0;
}

i want to find all the variables been used..
 
Old 05-06-2014, 01:27 PM   #2
zinat
LQ Newbie
 
Registered: Apr 2014
Posts: 11

Original Poster
Rep: Reputation: Disabled
I used the symbol table creation but this not giving output according to what i want
 
  


Reply

Tags
c programming



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash to find all placeholder variables in a file and replace will real variables spadez Programming 6 11-26-2013 12:24 PM
puppet code to ask for variables edwardcode Programming 1 12-03-2012 12:31 PM
Environmental Variables in BASH Source Code BonzoDog7827 Linux - Software 1 03-17-2011 12:26 PM
I found two variables in one source code that have not been defined where soltanihaji Linux - Software 7 07-25-2008 05:14 PM
mod_python: POST and GET variables, and code caching Mike_W Programming 0 03-07-2008 05:26 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration