Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8145381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:38:49+00:00 2026-06-06T13:38:49+00:00

I am trying to extract debug information from a compiled C program with C#,

  • 0

I am trying to extract debug information from a compiled C program with C#, and need to store the global variables.

If I have the variable:

const unsigned char * volatile MyVariable;

the name of the variable will be MyVariable, and the type is unsigned char. what will be const and volatile. Are they part of the type?

I have to represent a variable with a class and I am lost on how to construct it. This is how I have represented it right now:

public class MyVariable
{
     public string Name;
     public string Type;

     public bool IsArray;
     public bool IsPointer;
     public bool IsConstant;
     public bool IsVolatile;
     // etc...

     public int Size; // in bytes
}

Should I make volatile and const part of the type? What are they? Attributes?

Edit

Sorry I think I did not explained my self correctly. my question should have been how should I construct MyVariable class I know what the const keyword does to a variable and also the volatile. I use the volatile keyword when I create a variable that will be accessed by multiple threads for example.

Anyways so based on the answers I should be constructing my class as:

public class MyVariable
{
     public string Name;
     public string Type;

     public string[] TypeQualifiers;

     public int Size; // in bytes
}

where TypeQualifiers will be an array of those keywords (type qualifiers). Thanks a lot for the help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T13:38:50+00:00Added an answer on June 6, 2026 at 1:38 pm

    const and volatile are both type qualifiers, although they are completely independent.

    The const keyword specifies that the object or variable cannot be changed within the code.

    The volatile qualifier declares the data can have its value changed in ways outside the control or detection of the compiler, preventing the compiler from applying any optimizations on the code (such as storing the object’s value in a register rather than the memory, where it may have changed).

    A variable which is both const and volatile means that it is guaranteed not to be changed in the current code, but that does not mean that it cannot be changed externally.


    EDIT: As a sidenote, unsigned is a type modifiers in C, just like signed and long.
    I suggest that you also have independent type fields such as IsSigned, IsUnsigned and IsLong in addition to the type itself (int, char, etc…).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying extract some information from the below given string >>> st =
Trying to extract variable names from paths (variable is preceded with : ,optionally enclosed
I am trying to extract a date from a string variable and was hoping
I'm trying to extract data from a MySQL server with PHP. The information has
I'm trying to extract some information from web server log and it's not very
I'm trying to extract the ARFCN TMSI and IMSI from an android phone connected
I am currently trying to extract WiFi information such as signal strength and MAC
I'm trying to extract strings from a text that features two different types of
I'm trying to extract 2 jar files from the currently running jar however they
I'm trying to extract data from a many to many table configuration. I'm sorry

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.