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

  • SEARCH
  • Home
  • 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 7492335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:25:12+00:00 2026-05-29T16:25:12+00:00

Considering the following c code: typedef struct ELE *tree_ptr struct ELE { long val;

  • 0

Considering the following c code:

typedef struct ELE *tree_ptr

struct ELE {
   long val;
   tree_ptr left;
   tree_ptr right;
};

I believe ELE encapsulates a single node of a binary tree. Each node has some 32-bit value(val), a pointer to a left node, and a pointer to a right node.

Can someone confirm that my interpretation is correct?

Also, is ELE just an arbitrary variable name or some convention used to name a struct?

edit:

What if there was a c program that generated the following 3 lines of assembly code:

movq     %rbx, -24(%rsp)
movq     %rbp, -16(%rsp)
movq     %r12, -8(%rsp)

Are these 3 lines making room for the 3 elements of the struct on the stack?

  • 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-05-29T16:25:13+00:00Added an answer on May 29, 2026 at 4:25 pm

    That would most likely be ELEment, one element of the collection.

    A few other points to consider:

    1. Your typedef needs a semicolon at the end.
    2. The C standard doesn’t guarantee that long integers are 32 bits.
    3. The type tree_ptr indicates that it probably is a binary tree but all you know for sure is that it’s a structure containing a long and the two pointers to the same type as the structure. It may well be a doubly-linked list if the coder that put it together was deranged or sadistic enough 🙂
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Considering the following code: <div style=float: left;> <select style=width: 160px;> <option>asd flkjh asdfkljha sdlkfjhasldjkfh
Considering the following code: controls = { 'w': 'up', 's': 'down', 'a': 'left', 'd':
Considering following code public class A { public static void main(String[] args) { new
Considering the following 2 lines of code (copied from w3schools.com > HTML < label
Considering following code: class Results { public int playerId; public int score; public int
This might be a dumb question, but considering the following semi-pseudo code. How do
Considering the following code public bool GetFalse() { return false; } public bool GetTrue()
I am programming in C. Considering the following Code. My structure is defined as:
Considering the following code public interface IEntity { int Id { get; set; }
Considering the following code, where the span elements are floating inside of the div

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.