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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:28:03+00:00 2026-06-15T17:28:03+00:00

how are you? int stack_empty(stack *s){ return (s == NULL); /* I dont get

  • 0

how are you?

int stack_empty(stack *s){
         return (s == NULL); /* I dont get this part, it returns what if its null? */
}

int main(){
         stack *s;
         if(stack_empty(s)){ /* what it means? like... whats the standard return of a function? */
               printf("its empty");
         }
         return 0;
}

My questions are in the comments of the code. Briefly they are:
-> Whats the standard return of a function?
-> What does return something == NULL means?

*I know what NULL, s or == means… my questions lies on those abreviated expressions.

  • 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-15T17:28:04+00:00Added an answer on June 15, 2026 at 5:28 pm

    == is a test for equality.

    If s is null then s == null is true the expression has a non zero value, so stack_empty will return non zero (probably 1). If s is not null, then s == null is false so the method will return 0.

    The if statement is effectively saying if expression is not 0.

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

Sidebar

Related Questions

I have this simple test file: #include stack.h int main() { Stack* stck =
#include <stack> using namespace std; int main() { stack<int> s; int i; for (i
int a[2]; This in memory actually looks like: //Assuming int is 2 bytes add=2000,
I created a stack class like this. Some times it runs and sometimes it
Within my code, I need to push an int onto Lua's stack. I know
In C#, Value Types (eg: int, float, etc) are stored on the stack. Method
int main(void) { char testStr[50] = Hello, world!; char revS[50] = testStr; } I
How can I code a stack in C++? I have tried this myself as
I have the following code but I get an error on this line userSpinner.setAdapter(adapter);
I have a string that looks like this: 7-6-4-1 or 7 or That is,

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.