Skip to main content

All Questions

-1 votes
2 answers
122 views

Why am I getting a segmentation fault? C, basic code

Why I am getting a segmentation fault? Unlike other similar questions posted here, it doesn't seem to me that I'm trying to access an array index that is out of memory. What I want the squeeze(char s1[...
superslime16th's user avatar
0 votes
1 answer
111 views

Does Segmentation fault occurs due to accessing of large amount of memory

Insertion of large amount of random strings in Red black tree is giving segmentation fault in Ubuntu but the code work fine for insertion of few string(less than 50) . The code though works when it is ...
Gourav 's user avatar
0 votes
1 answer
80 views

Allocating array of strings

Today i was having trouble allocating an array of arrays of char (an array of strings), i wrote this function to do so, but when printing the array, i had some problems with memory ( e.g. Segmentation ...
Pinguiz's user avatar
  • 123
1 vote
2 answers
45 views

Segamentation fault encountered while parsing contents of string separated by a delimiter

During an interview, I was asked to implement a solution for following problem in C programming language: Given an input string with a fixed pattern of contents separated by a delimiter, I need to ...
Kshitij_9192's user avatar
-1 votes
5 answers
91 views

unite two strings by copying one by one the characters of the second at the end of the first

this program it suppose to print Hello World but guess what exited, segmentation fault why is that happening ? #include <stdio.h> #include <string.h> char f(char *a, char *b) { int i ...
Thodoris Ampas's user avatar