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 8085229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:03:03+00:00 2026-06-05T18:03:03+00:00

I cannot understand what is the difference between: #define WIDTH 10 and int width

  • 0

I cannot understand what is the difference between:

#define WIDTH 10 

and

int width = 10;

What are the benefits of using the first or the second?

  • 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-05T18:03:05+00:00Added an answer on June 5, 2026 at 6:03 pm

    Well, there is a great difference. You can change the value of width, you can take its address, you can ask for its size and so on. With WIDTH, it will be just replaced with a constant 10 everywhere, so the expression ++WIDTH doesn’t make any sense. Ono the other side, you can declare an array with WIDTH items, whereas you cannot declare an array with width items.

    Summing it up: the value of WIDTH is known at compile time and cannot be changed. The compiler doesn’t allocate memory for WIDTH. On the contrary, width is a variable with initial value 10, its further values are not known at compile time; the variable gets its memory from the compiler.

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

Sidebar

Related Questions

I'm using for the firs time optional arguments but I cannot understand difference between
I cannot effectively understand the difference between these two queries. select * from person
I started studying about AppDomains, and I just cannot understand the difference between CreateInstance
I would like to understand which is the difference between these two programming concepts.
I am trying my best to understand what is the difference between ADO.NET -
I am trying to understand the difference between matches() and find() . According to
I would like to understand the key difference between parametric polymorphism such as polymorphism
I do not quite understand the difference between a C# reference and a pointer.
I have been struggling to understand the difference between Storyboards and coding in Objective-C.
I cannot understand the calculation 66 ⊕ fa = 9c. The sum is clearly

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.