Skip to content

Incorrect Return Type of main and Logic Errors in dequeue #1560

@shrivalidutt

Description

@shrivalidutt

The main function should have a return type of int, not void. This is important because it indicates the exit status of the program to the operating system.
In dequeue, the for loop to transfer elements from stack1 to stack2 doesn't handle the scenario where count is 0 properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions