Why segmentation(coredump) in the following code in C?
hi
I have a method which returns char*. In this method am using switch case. I am getting segmentation error in case 49 and my code is
getsubstring is a method am using to substring the string and it is working fine. If i remove if and else part it is working fine but if i add if else condition in case 49: it is throwing error Segmentation Coredump. Why? What could be the error? How to solve this?
Thanks
Hi All
Can anybody help me?
When ever am trying to run topas system gives me an error Segmentation fault(coredump)
does anybody ahve solution for this? (4 Replies)
hi everyone,
we have solaris 8 in sun v480 server.
it gives this error.
Segmentation Fault(coredump)
can anyone help me in this - urgently.
Regards
Karthik C (8 Replies)
Hi all,
I am trying to create few directories using script and its giving me segmentation error.
#!/bin/ksh
createDirectories()
createDirectories()
{
cat dirs | \
while read line
do
mkdir... (16 Replies)
I'm getting this error when trying to run a Acucobol program thru UNIX..
Segmentation Fault(coredump)
Precompiler error prevents compilation of xxxxxx.co.
Please help me in this case.. (1 Reply)
Hello,
I am running on a AIX5.2 server with Oracle 10g and 9i. My code compiles and works fine in 32-bit mode. The
same code compiles in 64-bit and runs good. The program catches CNTRL-C signal to terminate. Only on 64-bit code
when i hit CNTRL-C, the program exits with segmentation... (0 Replies)
Hi Friends,
I have written a small code in C which performs the below operations
Task : 1 ) read line by line from a file.
2 ) assuming 3th and 4th fields of the file as GN and GNTO
3 ) The target file should contain all the fields except GNTO.
4... (3 Replies)
Apologies for any typos...
Well guys, been researching 'goto' in C and they say that you can't 'goto' labels in another function as a segmentation fault will occur.
However I have found a way to 'goto' a label in another function that is NOT main() using the asm() function.
As you know I... (14 Replies)
Discussion started by: wisecracker
14 Replies
LEARN ABOUT PLAN9
atol
ATOI(3) Linux Programmer's Manual ATOI(3)NAME
atoi, atol, atoll - convert a string to an integer
SYNOPSIS
#include <stdlib.h>
int atoi(const char *nptr);
long atol(const char *nptr);
long long atoll(const char *nptr);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
atoll():
__ISOC99_SOURCE ||
|| /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
DESCRIPTION
The atoi() function converts the initial portion of the string pointed to by nptr to int. The behavior is the same as
strtol(nptr, NULL, 10);
except that atoi() does not detect errors.
The atol() and atoll() functions behave the same as atoi(), except that they convert the initial portion of the string to their return type
of long or long long.
RETURN VALUE
The converted value.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
+------------------------+---------------+----------------+
|Interface | Attribute | Value |
+------------------------+---------------+----------------+
|atoi(), atol(), atoll() | Thread safety | MT-Safe locale |
+------------------------+---------------+----------------+
CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD. C89 and POSIX.1-1996 include the functions atoi() and atol() only.
NOTES
Linux libc provided atoq() as an obsolete name for atoll(); atoq() is not provided by glibc.
SEE ALSO atof(3), strtod(3), strtol(3), strtoul(3)COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
GNU 2016-03-15 ATOI(3)