小编Man*_*aul的帖子

What is the reason behind the segmentation fault?

I'm unable to debug the following code in any debugger as it shows, "During startup program ended with segmentation fault SIGEGV"

This is code to find whether is a Graph is Bipartite or Not.

#include <stdlib.h>
#define ll long long

ll queue[1000000000];
ll last=0;
ll top=0;

int qempty()
{
    if(top==last) return 1;
    else return 0;
}

void emptyq()
{
    top=0;
    last=0;
}
void enqueue(long long x)
{
    queue[top++] = x;
}
void dequeue()
{
    queue[last++];
}
Run Code Online (Sandbox Code Playgroud)

Here I defined the …

c segmentation-fault

2
推荐指数
1
解决办法
50
查看次数

标签 统计

c ×1

segmentation-fault ×1